Ok, what if....
You are including the main template...
include_once("header.php");
Then the content code goes here...
include_once("footer.php");
Would I need to put the session information, in the header?
If so, how will I sort pages that can be seen by registered members and non-registered members. At the moment I got an example which should be on every page....
<?php
session_start();
if (!$_SESSION['userid'])
{ session_destroy(); }
?>
And this...
if (!$_SESSION['userid'])
{
header("Location:http://www.dot.com/login.php");
}
Should only be on pages I want logged in users to see. But I can't separate them because I'm using a php template.
Feck I'm tired, I think i'm gonna catch up on a few hours sleep. 🙁