i am trying to do within PHP page.I have form which contains radio button and i want to get their value and place in array. I dont know where i am doing wrong.
code:
$example = array();
$i=0;
while($row = mysql_fetch_array($query) or die(mysql_error())){
$a= $row['A'];
echo '<form method="get" action="?page=".$next."">';
while ($row=mysql_fetch_array($query))
{
echo '<div class="boxed" >';
echo "\t".'<tr><th>'.
$row['question']."<br>".
'</th><th>'."<input type='radio' name= 't[]' value='{$row['A']}'>".$row['A']."<br>".
'</th><th>'."<input type='radio' name='t[]' value='{$row['B']}'>".$row['B']."<br>".
'</th><th>'."<input type='radio' name='t[]' value='{$row['C']}'>".$row['C']."<br>".
'</th><th>'."<input type='radio' name='t[]' value='{$row['D']}'>".$row['D'].'</th>
</tr>';
echo '<input type="hidden" name="page" value="'.$next.'">';
echo '<input type="submit" name="submit"/>';
$i++;
echo '</div>';
echo '</div>';
}
echo '</form>';
if (isset($_GET['submit'])) {
$example[] = $_GET['t'];
echo $example . 'chk';
}
}