Re: track_vars and register_globals

From: Date: Mon, 08 Jul 2002 20:18:09 +0000
Subject: Re: track_vars and register_globals
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-14607@lists.php.net to get a copy of this message
Hi Scott On 08 July 2002 at 10:02:42 -0500 (which was 16:02 where I live) Scott Carr wrote > $SESSION['count'] should be used to access the variable. Did not work but see below. > Register globals set to true, would let you use $count, but is not > suggested due to security risks. True that is why I have it turned off. This worked, thanks Scot for the pointer. ==========8<============================================================= <? session_start(); if (!session_is_registered('count')) { session_register('count'); $count = 1; } else { $count = $HTTP_SESSION_VARS["count"] +1; $HTTP_SESSION_VARS["count"] = $count ; } ?> Hello visitor, you have seen this page <?= $count; ?> times.<p> <?= session_id(); ?><br> To continue, <A HREF="page2.php">click here</A> ==========8<============================================================= -- BFN, _______________________________________________ David | David Elliott | Software Engineer | _________________________| list@elliott.uk.com | PGP Key ID 0x650F4534 | | Ah Sarcasm, Gotta love it. -- Garrison Jim of Bajor. |

« previous php.windows (#14607) next »