track_vars and register_globals

From: Date: Mon, 08 Jul 2002 19:46:26 +0000
Subject: track_vars and register_globals
Groups: php.windows 
Request: Send a blank email to php-windows+get-14603@lists.php.net to get a copy of this message
Hi all, Ok So what am I doing wrong. System WIN 2K with 4.2.1, track_vars is enabled and register_globals is disabled. I have two pages page1.php ==========8<============================================================= <? session_start(); if (!session_is_registered('count')) { session_register('count'); $count = 1; } else { $count++; } ?> Hello visitor, you have seen this page <?= $count; ?> times.<p> <?= session_id(); ?><br> To continue, <A HREF="page2.php">click here</A> ==========8<============================================================= and page2.php ==========8<============================================================= <? session_start(); if (!session_is_registered('count')) { session_register('count'); $count = 1; } else { $count++; } ?> Hello visitor, you have seen this page <?= $count; ?> times.<p> <?= session_id(); ?><br> To continue, <A HREF="page1.php">click here</A> ==========8<============================================================= As you can see I want to do is save $count to use in the next page. I can find the session file and it does contain what I would expect. It appears to make no difference if session.use_cookies is set to '0' or '1'. -- Thank you for your time, _______________________________________________ David | David Elliott | Software Engineer | _________________________| list@elliott.uk.com | PGP Key ID 0x650F4534 | | Law is order, and good law is good order. - <Aristotle> |

« previous php.windows (#14603) next »