Marijn button #99
8
website/public/js/registerAndLogin.js
Normal file
8
website/public/js/registerAndLogin.js
Normal 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.history.back();
|
||||||
|
}
|
||||||
|
document.getElementById("demo").innerHTML = x;
|
||||||
|
}
|
||||||
@@ -4,20 +4,9 @@
|
|||||||
include("../views/login_head.php");
|
include("../views/login_head.php");
|
||||||
require_once("../queries/connect.php");
|
require_once("../queries/connect.php");
|
||||||
include_once("../queries/login.php");
|
include_once("../queries/login.php");
|
||||||
include_once("../queries/checkInput.php")
|
include_once("../queries/checkInput.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<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
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
|
if(isset($_SESSION["userID"])){
|
||||||
|
header("location: profile.php");
|
||||||
|
}
|
||||||
// define variables and set to empty values
|
// define variables and set to empty values
|
||||||
$name = $surname = $bday = $username = $password = $confirmpassword = $location = $housenumber = $email = "";
|
$name = $surname = $bday = $username = $password = $confirmpassword = $location = $housenumber = $email = "";
|
||||||
$genericErr = $nameErr = $surnameErr = $bdayErr = $usernameErr = $passwordErr = $confirmpasswordErr = $locationErr = $housenumberErr = $emailErr = "";
|
$genericErr = $nameErr = $surnameErr = $bdayErr = $usernameErr = $passwordErr = $confirmpasswordErr = $locationErr = $housenumberErr = $emailErr = "";
|
||||||
@@ -27,7 +29,7 @@
|
|||||||
} else {
|
} else {
|
||||||
$bday = test_input($_POST["bday"]);
|
$bday = test_input($_POST["bday"]);
|
||||||
}
|
}
|
||||||
|
g
|
||||||
checkInputChoice("username", "username");
|
checkInputChoice("username", "username");
|
||||||
checkInputChoice("password", "longerEight");
|
checkInputChoice("password", "longerEight");
|
||||||
checkInputChoice("confirmpassword", "");
|
checkInputChoice("confirmpassword", "");
|
||||||
|
|||||||
@@ -8,4 +8,5 @@
|
|||||||
type="text/css"
|
type="text/css"
|
||||||
href="styles/index.css">
|
href="styles/index.css">
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||||
|
<script src="registerAndLogin.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user