Re: Comments on my code Design...

From: Date: Wed, 21 Jun 2000 16:02:07 +0000
Subject: Re: Comments on my code Design...
Groups: php.general 
Request: Send a blank email to php-general+get-2505@lists.php.net to get a copy of this message
>My questions are - > * Since the user object is required on every page they jump around to >(they'll be > moving between pages a fair bit), should I use Session stuff here, or >default to > global variables to maintain the data? > This same question for the dbMySQL object. > I prefer to use session variables in a case like this. However, you have to be careful not to allow people to enter variables via GET and POST that override your session variables. If you have any questions on that, I'd be happy to explain furthur in private. I'm not sure what you mean by "default to global variables to maintain the data". Even if a variable is marked "global", it still only lasts for one page execution. Sessions are the only (good) way to preserve variables across pages. -- Matthew Leverton - matthew@aeroinc.net - http://www.allegro.cc

« previous php.general (#2505) next »