I have an include on my pages that connects to my database, and an include at the bottom of my pages that closes this connection. I am getting an error on the server that says:
[04-Feb-2008 07:51:28] PHP Warning: mysql_close(): 5 is not a valid MySQL-Link resource in /home/goldengl/public_html/inc/closedb.php on line 2
I’m not sure why I’m getting this. Here is my open connection and closing connection code:
Open connection include
[code=php]
$dbhost = “localhost”;
$db = “goldengl_inet”;
$username = “goldengl_username”;
$password = “password”;
$connect = mysql_connect($dbhost, $username, $password) or die(‘Error connecting to mysql’);
mysql_select_db($db);
Closing connection include
[code=php]
mysql_close($connect);
Thanks