My PHP script will show many radio buttons on the page which a client can choose and click then post it to other page. This script work well, but I prefer to use a picture rather radio buttons. When I change the radio button with a picture then I click on it then it post a wrong data, it always send the last data from MySQL table. Could anyone help??
<?PHP
echo "<FORM method='POST' action='file2.php'>
<table border='0' width='85%' cellpadding='0' style='text-align: center; border-collapse: collapse' id='table1'>";
$i = 1;
while ($row = mysql_fetch_assoc($queryresult))
{
extract($row);
if ($i == 1){echo "<tr>";}
echo "<td><input type='radio' name='radiobutton' value='$rowdata' size='20'";
echo "><input type='submit' value='$str'></td>";
$i++;
if ($i == 4){$i = 1; echo "</tr>";}
}
echo "</table></FORM>";
?>