I'm working with a form that feeds a MySQL database. The form allows the user to submit a news story and indicate which categories it goes in; it can go in one or more. The category list itself is dynamic and is generated by querying the Category table.
After the form is filled out, all news data is inserted into the News table, and the selected categories are inserted into the News2Category join table.
But I'm pulling my hair out trying to figure out how to create INSERT query for the News2Category table. How do I know whic boxes were checked? I assume I need to create an array of the ones that were checked, and then loop through the array, adding them to the News2Category table one at a time. But how do I create this array? How do I generate a list of checked boxes and then insert the ones that were checked?
Any detailed help would be greatly appreciated. This is the last thing I need to finish up a project, and the deadline is coming very, very fast.
Thanks.