|Keep It Simple, Stupid|
|( #3333=superdoc: print w/replies, xml )||Need Help??|
I took a look at the web page and noticed one thing up front that will probably cause you some difficulty. Each checkbox has the same name. This will make it impossible to distinguish one from another. Your best be here is to come up with a naming convention for the checkboxes. I would use the day follwed by a delimeter follwed by the hour. For example: monday-7, monday-8 ... monday-16, monday-17, tuesday-7, tuesday-8, etc.
I don't think you will find a way to avoid having a different name for each checkbox. You can still use a loop to create the form quite easily without a lot of code.
Parsing the query string out can be made very simple as well. Try this snippet:
This will return a hash (%webparams2) containg an entry for every checkbox that was checked when the form was submitted. The keys will be the names of the checkboxes. Now you can just loop through the hash or use map to create your database statement.
I hope this helps. If you would like a more complete example including form generation and db statement preparation, just let me know.
In reply to Re: Converting large numbers of checkboxes to small number of params