Hi There,
I have successfully put together a piece of code that creates a radio button for each table entry. The only problem I have now is that I want the first radio button seleted of the results. Has anyone got any ideas???
My code currently looks something like this:
<?php
$sql = "SELECT * from table_name";
$result = mysql_query($sql, $conn) or die(mysql_error());
while ($newArray = mysql_fetch_array($result))
{
$id = $newArray['id'];
$name = $newArray['name'];
echo "
<input type=\"radio\" name=\"group\" id=\"$id\" value=\"$name\">
$name<br><br>";
}
?>