I have multiple checkboxes on a web page. That is, I have 4 different categories of checkboxes. For example, I have those categories:
- decoration
- entertainment
- catering
- security.
Each of these have about 5 or more checkboxes.
How do I proceed to save them into a DB? I am using MySQL and JDBC.
I’d say make them attributes of whatever your form is representing in the database.
In plain English: make them
BOOLvalues, in the same table that you’re saving to when the user presses the “Submit” button (or whatever you’re giving them in the servlet).UPDATE
Okay, so if your users can only be one of each:
Your entries would look something like this:
And so on.