"Kirk Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> If register_globals is "Off" in php.ini, then do the following:
>
> - do not use session_register(), etc.
> - use $HTTP_SESSION_VARS for all accesses.
I have code similar to Henry's running fine on both 4.0.5 and 4.2.3 se
myVar'] = 'some new value';
print $HTTP_SESSION_VARS['myVar'];
Kirk
> -Original Message-
> From: Henry Grech-Cini [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 10:29 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Session variable under PHP 4
Thanks that works in my testing example. But why? The manual says:
Caution
If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use
session_register(), session_is_registered() and session_unregister().
But in index2.php I am using $HTTP_SESSION_VARS and it works?!
Need a bit of clarificati
In the first file, replace this line:
$HTTP_SESSION_VARS['variable']="the variables value";
with these two lines:
$variable = "the variables value";
session_register('variable');
This is because 'register_globals' is enabled in the php.ini file.
Kirk
> -Original Message-
> From: Henry
4 matches
Mail list logo