The mysqli_connect() function opens a new connection to a MySQL server.
Practical use: For a successful connection, you need four pieces of information: server address, username, password, and database name. Test it at home like this:
mysqli_connect_error() to determine the reason if the connection fails.mysqli_close() when you are finished working.