I am trying to make the user get redirected to the index.html page in case the $_SESSION['loggedin'] is already set. For some reason, it doesn't redirect the user, although the $_SESSION['loggedin'] when echoed returns a value.
if(!empty($_SESSION['loggedin'])) { header('Location: index.html');};
What am I doing wrong here?