Chris -
I tried registering the variable as global with no effect. In fact, it seems to delete the value of $path that was sent to the function.
For example, the function below is passed a value but somehow that value is lost through the use of the global command.
function require_user($path)
{
global $path;
echo "path=".$path;
session_register("path");
echo $HTTP_SESSION_VARS["path"];
if(session_is_registered("valid_user"))
return true;
else {
Header("location: login.php");
}
}
When I remove the global command, $path is passed correctly, but I cannot set the session variable. What am I missing?
For example:
function require_user($path)
{
echo "path=".$path;
session_register("path");
echo $HTTP_SESSION_VARS["path"];
if(session_is_registered("valid_user"))
return true;
else {
Header("location: login.php");
}
}
Your advice will be greatly appreciated.
--Andrew