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

Thread: Combo Box

  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo Box

    I have two combo boxes in the same page, if i choose an item from the first one, the second one (combo box) should add that item that i chose from the frist one...
    how can i do that with php?

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Sure you wanna do it that way? Be much easier using javascript. To get new values in the other drop down, you'd have to have the page reresh once the user has chosen a value from the first select.

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    As nightfire suggested this can be done with javascript.

    Advantages to using javascript: don't have to reload page
    Disadvantages to using javascript: not reliable as people can disable javascript

    Advantages to using PHP: can populate options from database, more reliable
    Disadvantages: have to reload page
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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