Skip to content
Advertisement

Trying to get value out of a select option in the same form

I’m trying to get value out of the select option. But it doesn’t seems to be able to get since it’s on form. How do I do it ? I mean by having taking the value out of the option select.

Advertisement

Answer

1.) You can not select all the items in a select with selected ! Without multiple="multiple"

E.g. topFr[]

if you can have multiple selected the name must be an array here stockid[]

If you get from the <Form> an array you must treat request.getParameter("stockid")as an array !

2.) OR stockid = INT then

You can not pass a string to a field = INT

if stockid is INT !

will set a String to the query and the String will be quoted

wrong

you need

Try

also you should test with for empty !

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement