How to use mysql close in PHP

In this article I am going to explain about mysql_close function in PHP.
  • 1932

PHP mysql_close() Function

The PHP mysql_close function closing one open connection to MySQL database.

Syntax of mysql_close function

mysql_close(connection)


Parameters in
mysql_close function

It has only one parameter:
 

Parameter Description
connection It specifies mysql connection.

Example of mysql_close function

<html>

<body>

<?php

$con=mysql_connect("localhost","gupta","sharad");

if(!$con)

{

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

}

mysql_close($con);

?>

</body>

</html>


You may also want to read these related articles :
here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.