Proper login
This commit is contained in:
1 parent
ab0e2818c0
commit
39dc99cbd6
8 files changed
+113
-45
No files matched your search
@@ -0,0 +1,9 @@
|
||||
<?php // INCLUDE: Redirect to login.php if not authorized
|
||||
session_start();
|
||||
if(isset($_POST['logoff'])){ // Logout attempt: logout
|
||||
unset($_SESSION['user']);
|
||||
}
|
||||
if(!isset($_SESSION['user'])){ // Not logged in: login
|
||||
header('Location: login.php');
|
||||
}
|
||||
?>
|
||||
Reference in new issue
Block a user