In article <9bjvo1$irv$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Ben")
wrote:
> i'm trying to use sessions with my project, but it seems that registered
> variables in a session aren't global by default.
They should be. Can you show an example of the code that leads you to
believe they're not?
> It doesn't even seem like the session is global, because if I reference the
> sessionid (which only shows up if cookies are disabled)
> by using <?=SID?>, it shows up within a function, if I reference it from
> within the function.
That's because SID is a constant (no dollar sign). Only variables have to
be declared as global before using the global version in a function.
--
CC
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]