Hey guys,
I've been working on this problem for hours now and I've run out of ideas...
I want to use sessions to hold a value (1 or 0) which will be used to decide whether someone has already logined in to the site sucessfully when they move around the site. For some reason the sesson variable will not hold the variable.
I've simplified my code down to make it easier to understand:
<?php
// test.php
if (!isset($grantAccess))
{
session_register("grantAccess");
$grantAccess = 0;
echo "Grant Access not set before - setting now!";
}
else
{
echo "Grant access set b4";
}
?>
<head>
<title>Session Test</title>
</head>
<body>
<a href="./test.php">Main</a>
</body>
Shouldn't the value still be held once the 'main' link is pressed again?
Thanks for any help guys...
James