Discussion Locked

Using the "multiple" Value in a list box

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

2 replies

by tripcity

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

by talkingstone

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.

This discussion is closed to new replies.