+ 2
What is the best way for connecting php to the database?
3 Respuestas
+ 2
<?php
/* Attempt MySQL server connection. */
$mysqli = new mysqli("localhost", "root", "", "demo");
// Check connection
if($mysqli === false){
die("ERROR: Could not connect. " . $mysqli->connect_error);
}
echo "Connect Successfully. Host info: " . $mysqli->host_info;
?>
0
thanks