> -----Original Message-----
> From: Justin French [mailto:[EMAIL PROTECTED]]
> Sent: 04 December 2002 14:15
>
> Good point -- are the included files functions, or other stuff??
>
> function myfunc()
> {
> return $_SESSION['something'];
> }
>
> will not work, but:
Oh, yes it will! -- $_SESSION is, after all, a *superglobal*!
Now, this won't work:
function myfunc()
{
return $HTTP_SESSION_VARS['something'];
}
And nor will this (assuming register_globals=On):
function myfunc()
{
return $my_session_var;
}
-- both of these need an appropriate global statement, or use of the $GLOBALS array.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php