i have few answers to quiz stored in db. i am displaying them as radio buttons on form like this
$row = mysql_fetch_array(mysql_query('select * FROM quiz order by rand() limit 1'),MYSQL_ASSOC);
<?php
foreach ($row as $key => $value) {
echo "<input type='radio' name='answer'>".$value."</input><br />";
}
?>
but when i post this form the echo on other end is not getting a radio button answer i selected. please help
echo "<input type='radio' name='answer' value='".$value."'>".$value."</input><br />";
The only things that I can see is that
a) There is no form tag outside of the radio
b) You aren't giving the radio a value such as:
<input type='radio' name='answer' value="1"> Male
<input type='radio' name='answer' value="2"> Female