MySQL Connect
The function mysql_connect() extension is deprecated. It is recommended to use one of the 2 alternatives.
- mysqli_connect()
- PDO::__construct()
PHP mysqli_connect()
The PHP mysql connect function is used to connect to a MySQL database server.
Syntax
resource mysqli_connect (server, username, password)
PHP mysqli_close()
PHP mysqli_close() function is used to disconnect with MySQL database. It returns true if connection is closed or false.
Syntax
bool mysqli_close(resource $resource_link)