9 lines
168 B
PHP
9 lines
168 B
PHP
<?php
|
|
session_start();
|
|
|
|
// If the user is not logged in, redirect to the login page.
|
|
if (!isset($_SESSION['user_id'])) {
|
|
header('Location: login.php');
|
|
exit;
|
|
}
|