
<?php
// Start session if not already started
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

// Check if user is logged in via session
if (!isset($my_profile_id) || empty($my_profile_id)) {
    // User is not logged in, redirect to login page
    header('Location:index.php');
    exit();
}

?>
