Once you have opened a connection to your MySQL database from your PHP document, you can close it again using the mysql_close () function. Most of the time this isn't necessary, because MySQL connections are usually closed by default at the end of the script.
More PHP / MySQL Quick Tips
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password') ;
if (!$link)
{
die(mysql_error()) ;
}
print 'You are connected';
mysql_close($link) ;
?>

