Results 1 to 4 of 4
Drop-down list last value should be remember Forum: HTML ForumReplies: 0
cookies and drop down menu Forum: PHP ForumReplies: 4
04-15-2003, 09:37 AM #1
Setting cookies to remember drop down list
I have a page that the users choose their name from a drop down list, and then continue onto the rest of the site.
How can I set it up so that cookies are set to automatically choose the name from the list (over 30 names in the list).
I can't seem to find anything on the net about such a thing, just about typing in a pop-up screen, and then always remembering... I need the drop down box! =)
Any and all help, is very much appreciated!
04-15-2003, 09:45 AM #2
Hello. Welcome to the forums.
You dont say what language you are planning on using, so I will keep it generic.
Set the cookie any way you like, then use whatever language you wish to detect the cookie value and write out 'selected' into the select <option> tag of the matching name.
Post again if thats not clear (its not clear to me, and I wrote it)
04-15-2003, 09:58 AM #3
Thanks for the quick reply!
The problem is that I don't know how to code the cookie, so that it saves the choice from when the user first selects his/her name from the drop down box - I hate asking this in general, but could you supply some code (or a decent link) perhaps?
Then the cookie gets read every time after the user returns to the page.
Thanks again for your time!
04-15-2003, 12:09 PM #4
This tutorial can explain it better than I can -