Added http response code

This commit is contained in:
neerholt
2021-03-19 13:25:27 +01:00
parent 409556ca2e
commit 171e0a3765
18 changed files with 103 additions and 112 deletions
+7 -10
View File
@@ -25,26 +25,23 @@ if(isset($_POST['login'])){
$_SESSION['groupName'] = $groupName;
$_SESSION['token'] = $token;
$_SESSION['success'] = "You are now logged in";
header('location: ../../../Frontend/index.php?login=success');
exit();
//header('location: ../../../Frontend/index.php?login=success');
//exit();
http_response_code(200);
}
else{
session_destroy();
header('location: ../../../Frontend/index.php?login=failed&?reason=token');
exit();
http_response_code(500);
}
}else{
session_destroy();
header('location: ../../../Frontend/index.php?login=failed&?reason=password');
exit();
http_response_code(401);
}
}
else{
}else{
session_destroy();
header('location: ../../../Frontend/index.php?login=failed&?reason=group');
exit();
http_response_code(400);
}