<?php
session_start();

if (!isset($_SESSION['logged_in']) || $_SESSION['logged_in'] !== true) {
    if (isset($_COOKIE['remember'])) {
        $_SESSION['logged_in'] = true;
        $_SESSION['username'] = $_COOKIE['remember'];
    } else {
        header('Location: /menu-admin/login.php');
        exit;
    }
}
?>
