<?php
$host = "localhost";
$user = "root";
$pwd = "";
$dbname = "mygallery";

$conn = mysqli_connect($host, $user, $pwd, $dbname);
if (!$conn) {
    die("Database Connection Failed: " . mysqli_connect_error());
}
?>