Select chekbox from column1 and column2 and combination is to be stored in database on submit button in php

The thing that I need to develop can be easily understood from the below mentioned link. I have two columns of checkboxes. I need to store the combination of both . for eg. as hown in image I have list of circles and products if user clicks on circle1(c1) and products p1,p2. then I need to store in the database the combination as below.
c1->p1
c1->p2

like wise.How should I do this.
I was thinking that as soon as circles are checked I need to store the value of it in temporary table.please suggest me which concepts should I use. There can be multiple circles and multiple products.

https://drive.google.com/file/d/0B1rpCWtUcfePcDFjR0lPQlhYV3M/view?usp=sharing


Source: forms

Leave a Reply