Loading dashboard."; header("Location: dashboard.php"); }else{header("Location: index.php?q=3");} // validated incorrectly. mysqli_close($connection); }else{ header("Location: index.php?q=2");} // Forgot to pass either: email || pass ?>