Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Drop down list help

    Hi, I am trying to build a page which allows registered users to edit their details. The first field is "Title". I want this to be a drop down box as there are limited values. Now I have no problem in creating a dropdown box but I want it to default to the value they have already in the database.

    Could anyone give me some pointers as to how is best to do this? Cheers, Andy.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The server side code that's producing the option list should add the "selected" property to whichever option item matches the database entry as the page is written out to the user. How exactly you'd do that depends on what server side language you're using. If the langauge is one that has a forum here, you should post any follow up questions to that appropriate forum so you'll get the right people's attention.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    Don't cross post, check out the PHP forum for a response.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •