<?php
// Check if the 'logged_in' cookie is set
if (!isset($_COOKIE['logged_in']) || $_COOKIE['logged_in'] !== 'true') {
    // Redirect back to index.php if the cookie is not set or not valid
    header("Location: index.php");
    exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Log Page</title>
</head>
<body>
    <h1>You are now logged in</h1>
    <p>Welcome to the log page.</p>
</body>
</html>
