Don't Miss

How to connect PHP to MySQL database XAMPP

By on January 20, 2018

<?php

$hostname = “localhost”;

$database_name = “myschooldatabase”;

$database_username = “root”;

$database_password = ” “;

$con=mysqli_connect(“$hostname”,”$database_username”,”$database_password”,

“$database_name”) or die(“can not connect”);

if($con) { echo “Connection OK”; }

else { echo “Error Occurs”; }

?>

 

About CodingBazz

Leave a Reply

Your email address will not be published. Required fields are marked *