Merge branch 'joey-testing' into 'master'

Fixed redirect to profile page after going back 1 page

See merge request !88
This commit was merged in pull request #92.
This commit is contained in:
Lars van Hijfte
2017-01-20 16:26:19 +01:00
4 changed files with 15 additions and 15 deletions

View File

@@ -0,0 +1,8 @@
function checkLoggedIn() {
if (confirm("You are already logged in!\nDo you want to logout?\nPress ok to logout.") == true) {
window.location.href = "logout.php";
} else {
window.location.href = "profile.php";
}
document.getElementById("demo").innerHTML = x;
}

View File

@@ -4,20 +4,9 @@
include("../views/login_head.php");
require_once("../queries/connect.php");
include_once("../queries/login.php");
include_once("../queries/checkInput.php")
include_once("../queries/checkInput.php");
?>
<body>
<script>
function checkLoggedIn() {
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>
<?php
session_start();

View File

@@ -9,7 +9,9 @@
<body>
<?php
session_start();
if(isset($_SESSION["userID"])){
header("location: profile.php");
}
// define variables and set to empty values
$name = $surname = $bday = $username = $password = $confirmpassword = $location = $housenumber = $email = "";
$genericErr = $nameErr = $surnameErr = $bdayErr = $usernameErr = $passwordErr = $confirmpasswordErr = $locationErr = $housenumberErr = $emailErr = "";

View File

@@ -6,6 +6,7 @@
href="/styles/main.css">
<link rel="stylesheet"
type="text/css"
href="/styles/index.css">
<script src="/js/jquery.js"></script>
href="styles/index.css">
<script src="jqeury.js"></script>
<script src="registerAndLogin.js"></script>
</head>