+ 2
How to connect database to PHP
3 Respuestas
+ 6
I assume you want to connect to a mysql db?
<?php
$servername = "localhost";
$username = "username";
$password = "password";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
+ 2
thanks
+ 1
Good