Marijn button #99

Merged
11166932 merged 152 commits from marijn-button into master 2017-01-23 13:25:08 +01:00
Showing only changes of commit db2fb1b353 - Show all commits

View File

@@ -10,6 +10,10 @@
<?php
session_start();
if(isset($_SESSION["userID"])){
window.onload=checkLoggedIn();
}
// Define variables and set to empty values
$uname = $psw ="";
$loginErr ="";
@@ -42,5 +46,18 @@
/* This view adds login view */
include("../views/login-view.php");
?>
<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");
}
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>