> I'd like to register a session and create several session variables. In > another part of my site, I'd like to register another session again > creating > session variables. After a bit, I'd like to destroy this second > registered > session keeping the first intact. Thus far, whenever I issue: > > session_unset(); > session_destroy(); > > both sessions are obliterated. Is there a method of managing different > sessions where I can create additional sessions and destroy them without > losing my initial session?
There is only one $_SESSION. What you can do, though, assuming you're using the latest version of PHP, is make $_SESSION a multi-dimensional array. So for one area of your site, you can assign variables to the session like this: $_SESSION['area_one']['value1'] = "This String"; $_SESSION['area_one']['value2'] = 10; Then, in another area, you can do the same thing, basically... $_SESSION['area_two']['value1'] = 'Something'; $_SESSION['area_two']['value2'] = 1000; Then...when you want to drop the session values for Area Two, you just do this: Unset($_SESSION['area_two']); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php