// Starts the session session_start(); // Checks if the user is logged in if (isset($_SESSION['username']) && $_SESSION['username'] == 'admin')) { echo 'Hello administrator, would you care to access the secret page or logout?'; } else { echo 'Hello stranger, if you the admin you could login.'; } ?>