However, I'm still mystified as to why unset($_SESSION) not only
doesn't remove old data from the sesison file when the script exits,
but prevents the new variable I create after that from being saved.
Perhaps $_SESSION as created by PHP is special and is tied to the
session storage, whereas if
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 28, 2004 8:33 AM
> To: [EMAIL PROTECTED]
> Cc: Ford, Mike [LSS]
> Subject: RE: [PHP] Using unset with $_SESSION
>
>
> > > Shouldn't unset($_SESSION) work
> > Shouldn't unset($_SESSION) work?
>
> No. The following Caution appears in the manual (at
> http://www.php.net/manual/en/ref.session.php#session.examples):
>
> Caution Do NOT unset the whole $_SESSION with unset($_SESSION) as
> this will disable the registering of session variables through t
On 27 January 2004 16:20, [EMAIL PROTECTED] wrote:
> On 27 Jan 2004 Stuart wrote:
>
> > In that case, try this...
> >
> > foreach (array_keys($_SESSION) as $key)
> > unset($_SESSION[$key]);
>
> Yes, I had tried that but forgot to mention it. It does work.
>
> However, I'm still mystified
On 27 January 2004 15:52, [EMAIL PROTECTED] wrote:
> I am trying to find a reliable method to clean out all session
> variables and start clean.
>
> Running PHP 4.3.1 on Win2K developing a web app to run on Linux.
> Session cookies are enabled, register globals is off. I access all
> session va
On 27 Jan 2004 Stuart wrote:
> In that case, try this...
>
> foreach (array_keys($_SESSION) as $key)
> unset($_SESSION[$key]);
Yes, I had tried that but forgot to mention it. It does work.
However, I'm still mystified as to why unset($_SESSION) not only
doesn't remove old data from the s
[EMAIL PROTECTED] wrote:
On 27 Jan 2004 Stuart wrote:
I am trying to find a reliable method to clean out all session
variables and start clean.
http://php.net/session_destroy
That destroys the file but (at least the docs say) does not clean out
the global variables, and does not seem to work in
On 27 Jan 2004 Stuart wrote:
> > I am trying to find a reliable method to clean out all session
> > variables and start clean.
>
> http://php.net/session_destroy
That destroys the file but (at least the docs say) does not clean out
the global variables, and does not seem to work in my example.
[EMAIL PROTECTED] wrote:
I am trying to find a reliable method to clean out all session
variables and start clean.
http://php.net/session_destroy
--
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
9 matches
Mail list logo