I get '4', as expected, on v.4.0.6. Kirk
> -----Original Message----- > From: Valdas Andrulis [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 3:43 AM > To: [EMAIL PROTECTED] > Subject: [PHP] session variables and unset > > > Hello, > > I have 3 scripts: > > ## i2.php > <?php > session_start(); > $counter = 1; > session_register("counter"); > header("Location: /i.php"); > ?> > > ## i.php > <?php > session_start(); > $counter = 0; > ### uncomment this to see the difference > # session_unregister("counter"); > session_register("counter"); > unset($counter); > $counter = 4; > session_register("counter"); > header("Location: /i1.php"); > ?> > > ## i1.php > <?php > session_start(); > print $counter; > > ?> > > When I open http://host/i2.php on my browser I get 0, though > I expect it > to be 4. If I uncomment session_unregister("counter"); I get 4 as > expected. > > PHP version 4.1.2. > > Anyone can explain this behavior? Also can anyone try this with say > 4.0.5 or older version of PHP? > > Good luck, > > Valdas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php