General discussion

Locked

Using the "multiple" Value in a list box

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

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Wish I could...

by tripcity In reply to Using the "multiple" Valu ...

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

Collapse -

here's the fix...

by talkingstone In reply to Using the "multiple" Valu ...

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.

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums