Sandsynligvis har du en forbindelsesfejl i mysqli_connect. Forkerte legitimationsoplysninger eller MySQL er nede.
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();
}