password; if(password_verify($password, $hashedPassword )){ $_SESSION['userName'] = $userName; $_SESSION['admin'] = true; $_SESSION['success'] = "You are now logged in"; header('location: ../../../Frontend/index.html?login=success'); }else{ session_destroy(); header('location: ../../../Frontend/index.html?login=failed?reason=password'); exit(); } }else{ session_destroy(); header('location: ../../../Frontend/index.html?login=failed?reason=username'); exit(); } }else{ header("location: ../../../Frontend/index.html?error=NoLogin"); exit(); }