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();
?>
var_dump($row[1]);instead, because the$row[1]is an array of the selected values. If you want to get the value you need to put it in anotherforloop,then insert the joined value in DB?