3
This commit is contained in:
parent
d95336537a
commit
d04cdf42f1
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once 'auth_check.php'; // Protect this page
|
||||
require_once 'db/config.php';
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once 'auth_check.php'; // Protect this page
|
||||
require_once 'db/config.php';
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if ($user && password_verify($password, $user['password'])) {
|
||||
$_SESSION['user_id'] = $user['id'];
|
||||
$_SESSION['username'] = $user['username'];
|
||||
$_SESSION['role'] = $user['role'];
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user