Well, all scripts should close their connection to your database with the following code.
/* Closing connection */
mysql_close($link);
Where $link is mentioned earlier in your code with something that looks like this:
$link = mysql_connect("mysql_host", "mysql_user", "mysql_password")
or die("Could not connect : " . mysql_error());