So I'm checking if a user is logged in, and if so I'll remove the signup forms. So I thought I'd do it with if else statements. So here's my code
<?php if($_SESSION['loggedin'] === false): ?>
<h1>Sign Up</h1>
<?php elseif($_SESSION['loggedin'] === true):?>
<h1>Welcome</h1>
<?php endif;?>
For some reason all I get is a blank page. I'm using
error_reporting(E_ALL);
ini_set('display_errors', '1');
To display errors, but I'm not getting anything. On another page when doing a var_dump
on $_SESSION['loggedin'
I get bool(true)
, so I know that I'm logged in and expect Welcome
. I feel like its a syntax error.
Any ideas?