I have set up a website on my PC with XAMPP, MySQL and Apache enabled. I am getting this fatal error. I have set up the config files and followed the read-me correctly. However I cannot seem to get where the problem is. Database is correctly set up in config files and upload .sql to phpmyadmin.
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\includes\global.php:29 Stack trace: #0 C:\xampp\htdocs\includes\global.php(107): db_connection() #1 C:\xampp\htdocs\admin\index.php(9): include_once('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\includes\global.php on line 29
Line 26-33 in global.php
function db_connection()
{
global $config,$data_sql;
$data_sql = mysql_connect($config["sql_host"], $config["sql_user"], $config["sql_pass"]);
if (!$data_sql) die("Can't connect to MySql");
mysql_select_db($config["db_name"],$data_sql) or die("Can't select database");
}
function db_close()