Current course:

Closing a database connection


The code

mysql_close($db);

Explanation

mysql_close tells PHP to close a database connection. The "$db" is the variable you made to hold the connection. In our example it was $db, but it can be whatever you want, as long as the connection, the database select, and the close use the same variable.