Close a previously opened database connection:
<?php$con = mysqli_connect ( "localhost" , "my_user" , "my_password" , "my_db" ); // ....some PHP code... mysqli_close ( $con ); ?>The mysqli_close() function closes a previously opened database connection.
mysqli_close( connection ) ;
parameter | describe |
---|---|
connection | Required. Specifies the MySQL connection to be closed. |
Return value: | Returns TRUE if successful and FALSE if failed. |
---|---|
PHP version: | 5+ |