Having difficulty getting my code to work. And I can't find the problem for the life of me.
I want to update multiple records... Here's what I've got:
if (isset($Submit)):
$sql="update eom_vote set eom_vote.Value=Value where eom_vote.ID=ID";
$result=mysql_query($sql);
endif;
$sql="select eom_vote.ID, eom_vote.Name, eom_vote.Value from eom_vote order by eom_vote.ID";
$result=mysql_query($sql);
echo("<form name=\"form\" method=\"post\" action=\"showeom.php\"><table><tr>");
echo("<b>EOM Nominees</b><br>");
echo("<br>");
if (mysql_num_rows($result)>0):
while ($row=mysql_fetch_array($result))
{
print ("<input type=text Name=Value[$row[0]] Value=$row[2]><br><br>\n");
}
endif;
mysql_free_result($result);
?>
</table>
<p align=center><input type=Submit Name=Submit Value="Click to Update"></p>
</form>