Added arrow button for going to login.php

This commit is contained in:
Joey Lai
2017-01-20 15:25:37 +01:00
parent cc9ec9d54a
commit 15a3640eea
3 changed files with 43 additions and 19 deletions

View File

@@ -9,12 +9,11 @@
<body>
<script>
function checkLoggedIn() {
if (confirm("You are already logged in!\Do you want to logout?\Press ok to logout.") == true) {
unset($_SESSION["userID"]);
header("Location: login.php");
} else {
header("location: profile.php");
}
if (confirm("You are already logged in!\nDo you want to logout?\nPress ok to logout.") == true) {
window.location.href = "logout.php";
} else {
window.history.back();
}
document.getElementById("demo").innerHTML = x;
}
</script>