Unanswered: Insert multiple rows from checkbox values
have a list of checkboxes generated in php from an external table.
Each checkbox has a dynamic value and name. I am using a repeating region to display all the available checkboxes. Each check box also has a hidden input field asigned to that row. The value of this field is the id number of the article the checkboxes are to be associated with.
The insert statement I am using is supposed to insert all the ticked values along with their hidden id value field into a relationship table that will ink the two tables using the (hidden field) id number as the foreign key.
At present the statement is only taking the first checked value and storing that in the table.
I'm guessing i need to have some sort of loop in the SQL statement. Any ideas how I would do this? Just so I don't waste anyones time, I dont want to store the values in an array in the same table row. I want each checkbox ticked to be stored in a new row. (normalization table).
I'm sure this can be done using a foreach loop. I just don't have the technical know how to get it working.
My code is below.
Thanks in advance
************HERE IS THE PART OF THE TABLE (FORM) WHERE THE CHECKBOXES ARE GENERATED**********