faqts : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

12 of 14 people (86%) answered Yes
Recently 3 of 3 people (100%) answered Yes

Entry

How do I create variables that "remember" their value after I close the browser.

Mar 15th, 2000 19:05
Dave Garth, Don Lukkason, Onno Benschop,


If trying to get the server to remember the values to be used at a later 
time you could just write them out to a file. If your trying to get the 
server to remember values for next time a client visits you will have to 
use cookies. http://www.php.net/manual/html/features.cookies.html
A cookie could be used to store the value, or it could store a sessionID 
and a db be used to store any user data (this is a bit more secu