CONTACT @ Skype : rajdimdung   |   call : +977 9841813550

Open a Connection to MySQL

Post by : Raj Dimdung    Date : 2014-11-29 04:11:41

  • Share on Facebook

Open a Connection to MySQL

?php
$servername = "localhost"; // host name server name
$username = "username"; //dataabse username
$password = "password"; // database password

// Create connection
$conn = new mysqli($servername, $username, $password);

// Check connection
if ($conn--->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>

Related Posts