Koneksi PHP Database MySQLI

<?php
$host="localhost";
$user="root";
$password="";
$db="attendance";
$conn=mysqli_connect($host,$user, $password, $db);

if(mysqli_connect_errno()){
echo "Connection Fail".mysqli_connect_error();
}

?>
faheem