This is how you make the connection file to mysql database ( look for the example of the use here:
<?php
function OpenCon()
{
$dbhost = "localhost";
$dbuser = "username";
$dbpass = "password";
$db = "dbName";
$conn = new mysqli($dbhost, $dbuser, $dbpass,$db) or
die("Connect failed: %s\n". $conn -> error);
return $conn;
}
function CloseCon($conn)
{
$conn -> close();
}
?>
No comments :
Post a Comment