Basic stuff but plz helpppp

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yinkoh
Forum Newbie
Posts: 1
Joined: Wed May 29, 2002 4:05 am

Basic stuff but plz helpppp

Post 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
User avatar
gotDNS
Forum Contributor
Posts: 217
Joined: Tue May 07, 2002 5:53 pm
Location: West Chester, PA

Post by gotDNS »

I did it on one of my sites at home (im at school), i'll post later :wink:
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
User avatar
gotDNS
Forum Contributor
Posts: 217
Joined: Tue May 07, 2002 5:53 pm
Location: West Chester, PA

Post by gotDNS »

n/m then....
Post Reply