According to suggestion here to use $_POST method to declare array from checkbox values I made it. But it isn't working.
In mysql table below, it stores only text that says Array. It doesn't store any of the values checked.
Even if I put echo like in the code below, it prints out "Array".
HTML PAGE WITH QUESTIONNAIRE
<input type="checkbox" name="cb1[]" value="Mike"><input type="checkbox" name="cb1[]" value="Irena"><input type="checkbox" name="cb1[]" value="Sonya"><input type="checkbox" name="cb2[]" value="Samsung"><input type="checkbox" name="cb2[]" value="Apple">
PHP SCRIPT
for($i=1;$i<101;$i++) { if(isset($_POST['cb'.$i])) { $row[$i] = $_POST['cb'.$i]; }}echo $row[1]; //it gives Array insted of values selected in the cb1<?php$db =& JFactory::getDBO(); $query = "INSERT INTO storeresults(V1, V2) VALUES ('$row[1]','$row[2]')"; $db->setQuery($query); $db->query();?>