Wednesday, March 25, 2015

Create a simple database connection in PHP

Here is the simple php mysql database connection.

i'll put more option later.


<?php
//$conn=mysqli_connect("host","username","password","database");
$conn=mysqli_connect("localhost","root","","2phpmysql");
if(!$conn)
{
die ('connection error').mysqli_error();
}

?>

we'll discuss more about above in next tutorials.

No comments:

Post a Comment