Variables from drop down box

Discussion in 'Programming' started by gorskyLTD, Nov 20, 2006.

  1. #1
    Hi, i got small problem, i have created multiple choice drop down box!
    Now i choose multiple items, and then press submit, but it returns only last selected variable! How can i return array of selected variables? Thanks
     
    gorskyLTD, Nov 20, 2006 IP
  2. infonote

    infonote Well-Known Member

    Messages:
    4,032
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Using Javascript

    javascript.internet.com/forms/dropdown-box-population.html
     
    infonote, Nov 20, 2006 IP
  3. gorskyLTD

    gorskyLTD Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks mate, will see what i can do with this, if i will got problems will return to this great forum :)
    thanks
     
    gorskyLTD, Nov 20, 2006 IP
  4. gorskyLTD

    gorskyLTD Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi, this is not what i realy wanted, i use only one drop down box, and i can select, holding ctrl key multiple variables! When i post i only get last selected variable in drop down box!
     
    gorskyLTD, Nov 20, 2006 IP
  5. mani

    mani Peon

    Messages:
    679
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #5
    
    $_POST["selectbox"][i];
    
    Code (markup):
    where "i" is the number of element. You can count the array and put it in a variable.. i use a php code you can try you own(if asp etc)
     
    mani, Nov 21, 2006 IP