I'm building a website with user login details and sessions.
What im trying to do is to include one page if the session is set, or another if it is not. The code im using to do this is:
<?php
if (isset($SESSION)) {
include ("Comment.html");
} else if (!isset($SESSION)) {
include ("main.html");
}
?>
When this is run, it loads the comment page even if there is no session set. I can enter my log in details to the page and it recoginses the user by displaying their name, although the page does not change.
Any help would be appreciated.