Jump to content


Photo

Setting the value of a Combo Box


  • Please log in to reply
1 reply to this topic

#1 Rien17

Rien17
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 27 April 2006 - 09:36 PM

Hello, I need help with setting the value of a combo box on a page. The page gets values from a database and i want to set the user type value to one of three possible values. the three values are Guest Coach and Admin.
Thanks

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 27 April 2006 - 10:15 PM

to have one selected by default you need to add 'selected="selected" 'to the option tag. You would need an if statement to compare the value from your database and add that text of it is true.
follow me on twitter @PHPsycho




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users