I have a list of checkboxes like 1,2,3,4,5 when I use update statement I get 1 instead of 1,2,3,4,5 in my database column. I have checked to make sure request.form is returning 1,2,3,4,5 and it is but it only update one value instead of the array of numbers. Is there a simple way to get this to update correctly? Thanks for your help in advance.
Checkboxes not update in asp database
Collapse
X
-
Tags: None
-
Update statement
checkboxes are all name NMGroups with value of 1,2,3,4 etcCode:NMGroups = Request.Form("NMGroups") strSQL = "UPDATE NewsletterMembers set NMGroups = '" & NMGroups & "' WHERE NMID =" & NMID
I just need the array of numbers to update to one table called NMGroups in my database. Right now it works in my insert statement but when I us the update statement it only grabs the first number in the array. How do I grad all numbers like 1,2,3,4 and save it.Comment
-
fixed it I forgot to remove the whitespace used replace(request .form("NMGroups "), " ", "") 1, 2, 3, 4 almost looks like1,2,3,4 when I did the response.write to verify the form.Comment
Comment