PDA

View Full Version : Getting values from Multiple Select boxes into a DB


daffy_dowden
10-19-2005, 01:17 PM
How do get user answers from a multiple select box like the one below...


<select name="carPathChoices" multiple="multiple" size="10">
<option value="1">Administration</option>
<option value="2">Audit</option>
<option value="3">Business Process</option>
..Etc..
</select>


..into a DB?

So far the code I've got is as follows:


rs.open "select * from jobLink",conn
rs.AddNew

For i=1 to request.form("carPathComments").Count
rs("JobID") = request.form("carPathComments")(i)
Next

rs.update
rs.close


Clearly this isn't correct because it doesn't work, so could anyone tell me where I need to go from here?

Many Thanks,
Richard

Bullschmidt
10-26-2005, 12:39 AM
http://groups.google.com/group/microsoft.public.inetserver.asp.general/browse_thread/thread/a0b22bd87f4c23b7/1a4968f90ca281a2?lnk=st&q=%22Re:+probably+easy+for+you,+but+.+.+.%22&rnum=1&hl=en#1a4968f90ca281a2
microsoft.public.inetserver.asp.general

Multiple Selections
http://www.asp101.com/samples/multiple_selection.asp