Have a check like the following immediately you place values in the checkbox variables
Code:
$final = ""; //initialize this variable before starting the following condition checking
if($checkbox1 != "")
$final = $final . $checkbox1;
if($checkbox2 != "" && $final != "")
$final = $final .",". $checkbox2;
else
$final = $final . $checkbox2;
if($checkbox3 != "" && $final != "")
$final = $final .",". $checkbox3;
else
$final = $final .$checkbox3;
if($checkbox4 != "" && $final != "")
$final = $final .",". $checkbox4;
else
$final = $final . $checkbox4;
After this checking store the $final in the appropriate field in your table.
Another thing RDBMS packages recommend to store atomic values in the table field in your case you are combining two values using a comma and storing it in a single field.
Bookmarks