Im trying to implement a second if statement inside a first statement, all of that inside HTML. Should work like this:
If not, just display "welcome back" (Known User)
<?php if ($_SESSION['ID']): $log = 'Logout'; ?> <!-- If we have a session, login button becomes logout button-->
<h1>You are logged in <?php echo $_SESSION['Name']; ?>!</h1>
<?php if($_SESSION['locationcheck'] === False)?> <!-- If login script says location is missing, form comes up to enter location-->
<h2>Please complete by entering your location:</h2>
<!-- FORM TO ENTER LOCATION COMES UP-->
<?php endif; ?> <!-- This endif is unexpected-->
<?php else: $log = 'Login'; ?> <!-- We dont have a session, display login button-->
<h1>You are logged out!</h1>
<div><?php echo '<a href='.$helper->getLoginUrl().'>Login with fb</a>';?></div>
<?php endif ?>
The error I get is that the first endif is unexpected.