General discussion

  • Creator
    Topic
  • #2323079

    Using the “multiple” Value in a list box

    Locked

    by john ·

    I have a database on a remote server, (SQL) which I populate by gathering data from an HTML form. I have a variable called Catagory that is a multiple select list. I am passing the information along to PHP-4 which in turn populates the database table. The issue is this. The HTML is only submitting the last selected item in the catagory even though i select three
    items. I am under the assumption that I need to incorperate JAVASCRIPT to help me create a
    comma dilineated string to then pass along to the php. Can anyone help me with this one.

    Thanks

    JM

All Comments

  • Author
    Replies
    • #3406982

      Wish I could…

      by tripcity ·

      In reply to Using the “multiple” Value in a list box

      I wish I could, although I just wanted to say I
      wish these boards were more popular. Oh
      well.. maybe some day…the people will come.

      Have a good day.
      -Tripcity

    • #3415564

      here’s the fix…

      by talkingstone ·

      In reply to Using the “multiple” Value in a list box

      in you select tag in html, simply add the keyword “multiple” right inside the tag, not in quotes or anything. Then, when the form is submitted, pick up its value as an Enumeration;

      example via jsp:
      Enumeration enum = request.getParameter(selectBoxNameHere);

      Hope it helps.

Viewing 1 reply thread