how to add a new select list on the same page by clicking a button or something else

Discussion in 'PHP' started by 12345671, Oct 30, 2007.

  1. #1
    My environment is Php program and mysql database:
    On the webpage, after users choose a database and a table of the database,
    a web page for searching is presendted for user to choose what data they want to see.
    On the search page, users can input "id<100" by html selection list and text input

    What I want is:

    Put a little icon or button or whatever next, so when users click this icon, then another new selection list and text input
    is shown on the same page. so users can do the search like: id<100, and id>10.

    Futher, if user click the button again, another new selection list is shown, so users can do the search like: id<100, id >10 and age <50.

    Why I want this: is because some users may just need one search condition, some may need more, so I want the search condition is added when they need.

    Is this possible done by php? and how? or other suitable way? Please help!

    Thanks very much in advance.
     
    12345671, Oct 30, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    PHP can do this, but you would have to submit the form to the server to regenerate or create new select boxes. I assume you want this to happen directly. If that's the case you need Javascript to achieve this, and you should ask in the right forum for help:

    http://forums.digitalpoint.com/forumdisplay.php?f=38
     
    nico_swd, Oct 30, 2007 IP
  3. 12345671

    12345671 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If it could be done in php, how? I mean how to deal with the button for submit and the button for adding a new select list?
     
    12345671, Oct 30, 2007 IP