Give meaningful names to your check boxes and then capture their values and assign them to variables. Now you can concatenate these variables into a string variable. Use this string variable in your SQL query.
This is a discussion on Inserting checkbox values into one field within the Programming forums, part of the Web Designing & Development category; hi I have a checkboxes on my page (.aspx) like checkbox1 - item1 checkbox2 - item2 checkbox3 - item3 etc ...
hi
I have a checkboxes on my page (.aspx) like
checkbox1 - item1
checkbox2 - item2
checkbox3 - item3
etc
what i want is that when a user selects certain checkboxes
they should be inserted into a table called
customer which has fields (customer id and actions)
the data should be inserted as
customerid actions
1 item1,item2,item3
2 item1,item3
3 etc..
i.e all the values should be inserted into database into one field separated by commas.
Thanks
Give meaningful names to your check boxes and then capture their values and assign them to variables. Now you can concatenate these variables into a string variable. Use this string variable in your SQL query.
Medical Specialists Blog [COLOR=Blue]| Do follow blog from UK with special focus on health and life style [/COLOR]
Viagra UK [COLOR=Blue]| UK's first legal online clinic since 2001[/COLOR]
Bookmarks