Page 1 of 1

Basic stuff but plz helpppp

Posted: Wed May 29, 2002 4:05 am
by yinkoh
I'm just beginning in php and there's something i don't get :

I have a combobox and i want it to display the last chosen item when refreshing the page

IE : If a have "1,2,3" as Combo items, when i choose "3" my page correctly display the choice, but it goes back to "1" in the Combo

Hope i've been clear enough if not excuse me i'm french :p

TIA

Posted: Wed May 29, 2002 7:23 am
by gotDNS
I did it on one of my sites at home (im at school), i'll post later :wink:

Posted: Wed May 29, 2002 8:45 am
by volka
the value of the first <option>-element of a <select> is displayed by default.
In multi-selects you may use <option selected>.. or even better <option selected="selected">, this may also work with single-selects, too.
I've tested it with IE6, opera 6.01 and konquerer and it worked.

Posted: Wed May 29, 2002 1:50 pm
by gotDNS
n/m then....