15 lines
358 B
PHP
15 lines
358 B
PHP
<?php
|
|
session_start();
|
|
|
|
if (!isset($_SESSION['user_id'])) {
|
|
// If no user is logged in, redirect to the login page.
|
|
header("Location: login.php");
|
|
exit;
|
|
}
|
|
|
|
// Optional: You could add role-based access control here later.
|
|
// For example:
|
|
// if ($_SESSION['role'] !== 'artist') {
|
|
// die("You do not have permission to access this page.");
|
|
// }
|