After switching servers, I am getting an error in one of my scripts. Not sure what is wrong since everything worked before, and other functions/scripts appear to be working fine after the move.
Here is the error:
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource
I also have mysql_close() in other functions that execute withbout error.
Here is a code snippit (using PHP 4.3.3) ... its pretty simple:
function EraseCart($SESSION) {
$connection = mysql_connect("localhost","XXXX","XXXX") or die ("Unable to connect to MySQL server.");
$db = mysql_select_db("XXXX", $connection) or die ("Unable to select database.");
$query="delete from SHOPCART where SESSION='$SESSION'";
$result=mysql_query($query);
if(!$result)
{
include ("message/dberror.html");
exit;
}
mysql_close($db);
}
Any suggestions?
Thanks in advance