Which PHP function do you use to connect to a mysql database.
-
mysql_selectDB_server($server,$user,$password)
-
mysql_connection($server,$user,$password)
-
mysql_connect($server,$user,$password)
-
database_connect($mysql,$server,$user,$password,$database)
C
Correct answer
Explanation
mysql_connect() was the standard function in PHP's mysql extension (now deprecated) to establish a connection to a MySQL database server using the server address, username, and password parameters. Note that this extension is deprecated in favor of mysqli or PDO.