Thank you
Thank you for the code.
I accomplished it another way
Named my database columns for each answer like this
answer_1,answer_2,answer_3
My checkboxes have values 1,2,3 for each option.
So when I save the data in the database i add the checkbox value as a parameter to the column name that it will be saved and I get something like this.
$InsertQuery->bindColumn("answer_".$_POST['optionvalue'][0]."", "i", "".((isset($_POST['optionvalue'][0]))?$_POST['optionvalue'][0]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("answer_".$_POST['optionvalue'][1]."", "i", "".((isset($_POST['optionvalue'][1]))?$_POST['optionvalue'][1]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("answer_".$_POST['optionvalue'][2]."", "i", "".((isset($_POST['optionvalue'][2]))?$_POST['optionvalue'][2]:"") ."", "WA_DEFAULT");
My checkboxes are like this
<input type="checkbox" name="optionvalue[]" id="optionvalue_1" class="optionvalueclass" value="1">
a) first answer</dd>
<input type="checkbox" name="optionvalue[]" id="optionvalue_2" class="optionvalueclass" value="2">
b) second answer</dd>
<input type="checkbox" name="optionvalue[]" class="optionvalueclass" id="optionvalue_3" value="3">
c) third answer
So what it happens when I submit the form, the query adds the data depending on the values of the checkboxes user has checked