elibraryportal Logo

MySQL Connect in PHP


PHP mysqli_connect()

mysqli_connect() function is used to connect with MySQL Database

Syntax:-

PHP mysqli_close()

mysqli_close() function is used to disconnect the MySQL database. if connection is closed, It returns true or false.

Syntax:-

Example:- PHP MySQL Connect Database.

Output:-

Connected successfully
 

See in Fig:- For Database Connected successfully

PHP MySQL Connect Database.


PHP MySQL Connect Database.