Below code userpage.php forces the userpage.php to render blank page (no content) on browser since exit() command is not part of if condition. Once I comment that out, or move inside the if condition it works.
if (!isset($loggedInUser))
header('Location: login.php');
// else
// header('Location: /');
exit();
Shouldn't the correct code be:
if (!isset($loggedInUser)) {
header('Location: login.php');
exit();
}
Below code userpage.php forces the userpage.php to render blank page (no content) on browser since exit() command is not part of if condition. Once I comment that out, or move inside the if condition it works.
// else // header('Location: /'); exit();
Shouldn't the correct code be:
// else // header('Location: /');