0 votes
in PHP by (30.8k points)
How can we connect to a MySQL database from a PHP script?

1 Answer

0 votes
by (13.1k points)
To be able to connect to a MySQL database, we must use mysqli_connect() function as follows:

<!--?php $database = mysqli_connect("HOST", "USER_NAME", "PASSWORD"); mysqli_select_db($database,"DATABASE_NAME"); ?-->

Related questions

...