Page 1 of 1

Session Variable

Posted: Fri May 30, 2003 8:59 pm
by denimderek
Hopefully I don't come off sounding tooooo ignorant, but is there any reason I wouldn't be able to get a session variable to work inside of a function? I've tried making this variable a global variable, thinking that would pass the value to the function, but thats still not working. And I know that this server DOES have register_globals = On. Any ideas? Must I declare this variable as a global variable from within or outside of the function? The function is actually being called from an include("functions.php"); reference.

Posted: Fri May 30, 2003 9:59 pm
by denimderek
Nevermind! I'm lame, I got it. I had to use global $user_id; within the function, not outside of it.