What is the purpose of the mysqli_connect() function in PHP?
- To establish a connection to a MySQL database
- To execute a SQL query
- To fetch data from a MySQL database
- To close a database connection
The mysqli_connect() function in PHP is used to establish a connection to a MySQL database. It takes the necessary parameters, such as the host, username, password, and database name, and returns a connection object that can be used to interact with the database. Learn more: http://php.net/manual/en/mysqli.construct.php
Loading...
Related Quiz
- You can destroy a session in PHP by using the session_destroy() function.
- Which of the following are common uses of Form Handling in PHP?
- Which PHP function can be used to check if a function has been defined?
- What is the purpose of the array_push() function in PHP?
- A common use case of the time() function in PHP is to get the current Unix ______.