Hi all,
I am trying to create a radio button form, which gets it's values from my database. This is the code:
$menu = mysql_query('SELECT * FROM `menuoptions`',$conn) or die('Unable to retrieve menu options from database.');
$id = 0;
while ($id < mysql_num_fields($menu)) {
echo "<input type=\"radio\" value=\"menuoption\">" . mysql_result($menu,$id) . "<br>";
$id++;
}
The first option shows OK, but after that, I get these errors.
Warning: mysql_result(): Unable to jump to row 1 on MySQL result index 3 in install.php on line 126
Warning: mysql_result(): Unable to jump to row 2 on MySQL result index 3 in nstall.php on line 126
Warning: mysql_result(): Unable to jump to row 3 on MySQL result index 3 in install.php on line 126
What am I doing wrong ?