PhotoShare/models/Connection.php
Muhammad Anas Rashid 34753111ed My First Web application .. a real shitty one
My First Web application .. a real shitty one
2016-01-28 23:32:09 +05:00

20 lines
332 B
PHP

<?php
$conn="";
function getConnected()
{
$host = "localhost";
$dbuser="root";
$pass="";
$dbname="photoshare";
global $conn;
$conn=mysqli_connect($host,$dbuser,$pass, $dbname);
if(mysqli_connect_errno())
{
die("Connection Failed!").mysqli_connect_error();
return false;
}
return true;
}
$res ="";
?>