I can't seem to access session variables from within functions. Perhaps someone can suggest what I am doing wrong.
I know this is not the right forum, but the coding forum seems to be broken right now.
Thanks,
Andrew
Example
function set_foo($foo)
{
if(session_is_registered("foo")
$foo="bar";
}
$foo="test";
session_register("foo");
set_foo($foo);
echo $foo;
//when I do this, foo is not set to bar.