SSxjm8kR
2017-01-12 00:30:04

Code below demonstrate how to connect to a database using mysqli in php.

<?php
$serverName ="localhost";
$username = "username";
$password = "password";
$db_name = "databasename";
//echo "run now";
$conn = mysqli_connect($servername,$username,$password,$db_name);

if(!$conn){
die("Connection Failed" . mysql_error());
}
echo "successfully update";
echo "Connect to database";




?>