DavideToaldo
3/1/2019 - 1:13 PM

connessione ad un database con php

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";
?>