Re: Cookie/Session?

From: Date: Wed, 01 Nov 2000 20:50:53 +0000
Subject: Re: Cookie/Session?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23240@lists.php.net to get a copy of this message
Jan van Schaijk wrote: > Hi, > > what do I have to do if I have three variables that have to be stored the > first time the user enters the page, and the next time the user enters the > page (in a couple of days) read the variables again... > > For example: $name="Jan"; > > The first time the user will be asked it's name, and after he set the > variable, each page-visit I want to display it without asking him again... > > Jan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net Cookies are designed for that. Unfortunately, people hate the word cookies. Session will do the cookies for you. Session could even do it without cookies... but with major limitations. If you make him enter a user_id eveytime you could put it all in a database or even in a flat file. Of course a flatfile would apply only if security isn't an issue. -r-

« previous php.general (#23240) next »