+ 2

How to connect PHP to DB with MySql?

Step by step

28th Nov 2017, 11:26 PM
Francesco Castiello
Francesco Castiello - avatar
2 Respuestas
+ 3
https://www.w3schools.com/php/php_mysql_connect.asp <?php $servername = "localhost"; $username = "username"; $password = "password"; // Create connection $conn = mysqli_connect($servername, $username, $password); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } echo "Connected successfully"; mysqli_close($conn); echo "Connection closed."; ?>
28th Nov 2017, 11:32 PM
AgentSmith
+ 2
Ty ^^
28th Nov 2017, 11:37 PM
Francesco Castiello
Francesco Castiello - avatar