PHPSuperBlog.com

Close MySQL database connection

Editor’s note: You might wonder if you can open a connection with the MySQL database, but can you close the connection with the MySQL database?

First, connect to the database:

<?php
$connection = mysql_connect("Host Name", "User Name", "User Password");
?>

Now to close the connection, we use mysql_close( );

<?php
mysql_close($connection);
?>
VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)

Similar Posts:

Leave a comment