Made different files for login and register

This commit is contained in:
Joey Lai
2017-01-27 12:27:40 +01:00
parent 23904caf69
commit 609f350cd3
10 changed files with 482 additions and 479 deletions

View File

@@ -13,7 +13,7 @@ function getUser() {
`email` LIKE :username
");
$stmt->bindParam(":username", test_input($_POST["user"]));
$stmt->bindValue(":username", test_input($_POST["user"]));
$stmt->execute();
return $stmt->fetch(PDO::FETCH_ASSOC);
}
@@ -42,6 +42,9 @@ function validateLogin($username, $password){
</script>";
} else {
$_SESSION["userID"] = $userID;
if($_POST[rememberMe] == 1){
ini_set("session.gc_maxlifetime", "10");
}
header("location: profile.php");
}
} else {