Here is the whole code of the page:
PHP Code:
<?php
$_SESSION['loggedin'] = 0;
?>
<!--Default page display-->
<?php
if (!isset($_GET['action'])) {
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == 0) {
?>
<!--Intro Text-->
<p>Welcome to the Alton Towers Mania Membership System. Registering as part of the membership system will allow you to be more integrated with the site and give you access to do more exciting features, like submitting your high score on Duel to the high score board to tracking what rides you have ridden as well as which are your favourite rides at the park!</p>
<!--End Intro Text-->
<!--New Lines-->
<br /><br />
<!--End New Lines-->
<p class="center mediumheadings"><a href="membership.php?action=login">Log In</a> : : <a href="membership.php?action=register">Register</a></p>
<?php
} else {
?>
<!--If Logged in-->
<!--Intro Text-->
<p>Welcome to the Alton Towers Mania Membership System. Now you have logged in you can visit the various links below to access differnent parts of the site which support the membership system. Any areas of this site where you see the membership system icon, allow you to use your account with them.</p>
<!--End Intro Text-->
<!--New Lines-->
<br /><br />
<!--End New Lines-->
<ul>
<li>Ride Tracker</li>
<li>Favourites</li>
<li>Duel Score Board</li>
</ul>
<?php
}
}
?>
<!--New Lines-->
<br /><br />
<!--End New Lines-->
<?php
echo $_SESSION['loggedin'];
?>
<!--New Lines-->
<br /><br />
<!--End New Lines-->
AS you can see, near the top i am setting loggedin to be 0 but when the page is run the echo loggedin, (near the bottom), always outputs 1?
Bookmarks