Proper login

This commit is contained in:
pepa65 committed 2022-09-12 15:11:23 +07:00
1 parent ab0e2818c0
commit 39dc99cbd6
8 files changed
+113 -45

No files matched your search

+9
View File
@@ -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');
}
?>