Lo más probable es que tenga un error de conexión en mysqli_connect. Credenciales incorrectas o MySQL no funciona.
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
//you need to exit the script, if there is an error
exit();
}