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 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 it is destroyed with unset and then 
recreated that link is lost.  That would explain the behavior.

 ----------
 Tom Rawson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to