diff --git a/index.php b/index.php index 585de44..7c440cc 100644 --- a/index.php +++ b/index.php @@ -57,6 +57,15 @@ if(empty($page)){ } } +if($page == 'login') { + if(isset($_SESSION["user_id"])){ + $page = 'index'; + } + else{ + $page = 'login'; + } +} + // Check if the user is logged in if (isset($_SESSION['user_id'])) { if ($_SESSION['user_isAdmin'] == 1) {