If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

cookies and drop down menu

hi,
I am new in working with cookies.So if anyone can help mi please do
this is the problem:
I have a script prva.php that has a drop down menu in which there are various values to select.The thing that i want to do is that to remebrer the selected value from the drop down menu so that the next time a person visits this page the value he selected the previous time from the drop down menu would be selected now instead the default(nothing selected ).
the problem is I don't know what to put instead the red letters $Jazik because I tried doing $_POST["Jazik"] and $_POST["Jazik"] but this doesn't work also

Re: cookies and drop down menu

I'm having a bad day today, so apologies if this doesn't work!

Take out the selected="selected" from the first option - if none of the other options are set to selected it will default to the first one anyway, and if there are two you can't rely on browser behaviour to select the right one.

On the page that the form submits to, just set $_COOKIE['Jaz'] = $_POST['Jazik']That should be it.

Re: cookies and drop down menu

hi, i'm looking for the same thing but using javascript. would either of you be able to translate that to js? i'm a non-coder.

what i want to do is save user input via cookies which would be then listed in a drop down. so, suppose a user enters value1, submits it, then enters value 2, submits it, then enters value3, and submits. after each submit the dropdown (which would be under the input area. so would that be a combobox?) on the fourth use, the user selects value2 from teh dropdown and submits, on the fifth use, selects value1 and submits it.