I have built a secured section to my website, so have used to following:
<?
session_start();
if(!session_is_registered(myusername))
{
header("location:login.php");
}
?>
<html>
I am also using a session variable to make it easier to pass a variable from page to page (too hard to pass it through the url as the user can bounce back and forth among the pages). This is how I've declared it.
session_register ("oid"); $oid=$_GET['oid'];
The problem I have is that on the next page it doesn't recognise $oid. Is that anything to do with session_start() at the top of every page? Does it reset the session?