I am attempting to insert a select record set displayed from one tabe into another table. I am not very successful at this though can anyone see where I am going wrong with this please? All I want to do is insert the chosen radio into a table or just the id.
<form method="POST" action="added_items.php">
<?
$query = "SELECT * FROM pp2002_epsom1403230";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_assoc($result))
{
echo "<td>$row[item_no]</td>\n";
echo "<td>$row[horse_no]</td>\n";
echo "<td>$row[horse]</td>\n";
echo "<td>$row[trainer]</td>\n";
echo "<td>$row[form]</td>\n";
echo "<td>$row[jockey]</td>\n";
echo "<td>$row[wgt]</td>\n";
echo "<td><input type='radio' name='item' value='$row[item_no]'></td>\n";
echo "<BR>\n";
}
?>
<INPUT type="submit" value="pick the winner" name="button">
<INPUT type="hidden" name="item_no" value="<?php echo $row["item_no"]; ?>">
</FORM>