On Monday 28 January 2002 04:37, Floyd Baker wrote: > Can someone tell me why this is not working right? Two pages are > basically the same, passing an accumulating value back and forth. > There is no other session being created. The first time it increments > and passes to the second page, and is picked up. It puts a 1 in the > session file. After that, it seems to try, as in editor wanting to > reload, but the contents don't increase beyond 1. > > I have 4.1, register globals off, on Windows 98. > > TIA
> //pull value from session file: > $page_views = $_SESSION['page_views']; No need for this, in fact this is what is preventing it from working! Once you've used session_register('var'), $var is available for use. > print "<br>Return Page"; > print "<br>Before increment = $page_views"; > > //increment the counter: > $page_views++; > $page_views++; You're inc'ing $page_views twice, this is what makes you *think* the session is working when in fact it isn't! hth -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* On the road, ZIPPY is a pinhead without a purpose, but never without a POINT. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]