I want to gather one or more items with a checkbox input. Place these in an array and then pass them to a script to enter them into a MySql DB. Each record would have a recordid (Tied to another table's Primary key) along with one of the items checked. The table could have many record ids and many checkbox values. ie.
table1.recid=2 (call this recid)
For record 1 in table2:
recid = 2
checkbox=10
For record 2 in table2:
recid=2
checkbox=15
For record 3 in table2:
recid=2
checkbox=27
Other instances could be:
For record 4 in table2:
recid=5
checkbox=15
For record 5 in table2:
recid=5
checkbox=30
For record 6 in table2:
recid=1
checkbox=11
My problem is how to gather the checked items into an array, get the table1.recid from an insert to table1, and use the acquired table1.recid to insert each item in the array obtained from the checkboxes into table2 with the table1.recid (multiple times if multiple values in the array).
I hope this explains what I want to do.
Please get me started in the right direction.