connessione ad un database con php
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$databaseName = "nameDB";
// Create connection
$conn = new mysqli($servername, $username, $password, $databaseName);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>