Virtual Open Schooling Online courses available at Virtual Open Schooling (VOS), for more details kindly click here!
NIOS Silver Jubilee Year
NIOS

Closing a Connection

From NIOS
Revision as of 11:49, 24 August 2012 by Sanjay (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Previous Page Home Page Next Page
ICT Applications

The connection closes automaticallywhen the script ends. To close the connection before, we can use themysql_close() function:


<?php

$con =mysql_connect("localhost","userid","abc123");

if (!$con)

{

die('Could not connect: ' .mysql_error());

}

mysql_close($con);

?>


Previous Page Home Page Next Page
ICT Applications