Hindi Songs

Search About PHP!!!

Wednesday, July 8, 2009

Closing a Connection

The connection will be closed automatically when the script ends. To close the connection before, use the mysql_close() function:

< ?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

// some code

mysql_close($con);
? >