include "config.php"; session_start(); $currentPage = basename($_SERVER['PHP_SELF']); if (($currentPage != "login.php") && ($currentPage != "error.php")) { if (!isset($_SESSION['loggedin'])) { header("Location: login.php"); } } ?>