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
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