Hello i have a problem. i use session for any user that logs In my website. I use the session user id as a variable to show the first page of my site when one presses my website url (www.mywebsite.com) so, if the session user id is empty then returns the header
if(empty($sessionUid))
{
$url=$base_url.'guest.php';
header("location:$url");
}
But i want to use the empty session id to return the pages i want fot the guests not the ones that log in. On header.php
i use the header
include_once('header.php');
if(isset($sessionUid) && $sessionUid>0 )
{
include_once('topMenu.php');
include_once('main.php');
include_once('footer.php');
}
elseif(empty($sessionUid))
{
include_once('topMenuGuest.php');
include_once('guestMain.php');
include_once('footerGuest.php');
}
I use that in every .php file i call, BUT as its obvious, every time i try to call a .php file it redirects back to header("location:$url");
Is it another way to call the header? Or another way to call the guest files?