Merge pull request #599 from andreskrey/prg-method-during-login

Redirect the user to home after successful login
This commit is contained in:
Mcat12
2017-10-19 09:04:20 -04:00
committed by GitHub
+7
View File
@@ -40,6 +40,13 @@
if($postinput == $pwhash)
{
$_SESSION["hash"] = $pwhash;
// Login successful, redirect the user to the homepage to discard the POST request
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_SERVER['QUERY_STRING'] === 'login') {
header('Location: index.php');
exit();
}
$auth = true;
}
else