you need to connect the database. you have to create a database variable. You can use yakpro, but it wont fix deprecated code
I can only use TT as an example, but it should look like this, $GLOBALS is a php universal
Quote:
$GLOBALS["DBconnector"] = mysqli_connect($mysql_host, $mysql_user, $mysql_pass) or die('DATABASE: mysqli_connect: ' . mysqli_error($GLOBALS["DBconnector"]));
mysqli_select_db($GLOBALS["DBconnector"],$mysql_db) or die('DATABASE: mysqli_select_db: ' . mysqli_error($GLOBALS["DBconnector"]));
|
this is the original so you can see how I put it together, its simple
Quote:
mysql_connect($mysql_host, $mysql_user, $mysql_pass) or die('DATABASE: mysql_connect: ' . mysql_error());
mysql_select_db($mysql_db) or die('DATABASE: mysql_select_db: ' . mysql_error());
|
I created the DBconnector as a variable. You can name it what you want. Check for any deprecated functions by turning on display errors in your php config. You will be happier at the end of the day
each()
mysql_result()
the above are deprecated, emulate the function if you need to