0

Hi there,

I was wondering if someone could tell me how to store multiple checkbox values into a MySQL table?

I know how to work it with Python on its own but I need to store into a database.

Any ideas?

2
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by Shockbox
0

In which case each checkbox must have a different name and the posted values from each can then be inserted into or updated in the database into the relevant fields.

0

I had tried that with no avail.

I tried using a for statement as well using mykey but it didn't work either.

0

Please post your form and php / query code as we cannot help without seeing it. Also if you get any errors, what are they?

0

This is what I currently have:

boxes = { "des" : "Website Design",\
          "svr" : "Web Server Administration",\
          "com" : "Electronic Commerce",\
          "mkt" : "Web Marketing/Advertising",\
          "edu" : "Web-Related Education" }

store = form['boxes'].value
comments = boxes[store]

This is currently returning an error: <type 'exceptions.KeyError'>: 'boxes'
args = ('boxes',)
message = 'boxes'

I want the user to be able to click on the checkboxes and for the checked boxes to be stored into a database field.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.