+ 2
How to connect PHP to DB with MySql?
Step by step
2 ответов
+ 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.";
?>
+ 2
Ty ^^