The mysql_close function is used to disconnect from a MySQL Server.
Syntax:
boolean mysql_close (resource $DBHandle);
Arguments:
$DBHandle
A handle to an open MySQL server connection.
Return value:
If the disconnection is successful, the return value will be a boolean true.
If the disconnection fails, the return value will be a boolean false.
Example code:
<?php $UserName = 'abc'; $Password = '8sj27s'; $DbHandle = mysql_connect ('localhost', $UserName, $Password); if (!$DbHandle) { die 'No database connection could be established.'; } mysql_close ($DbHandle); ?>