I create a form using this code:
while ($row = mysql_fetch_array($query))
{
$a= $row['a'];
$b= $row['b'];
$display_block .=
"<tr>
<td><input type=text name='a[]' value='$a ></td>
<td><input type=text name='b[]' value='$b ></td>
";
}
I display the form. Then input new data into the form and submit. The question is how do I update the table on the new page?
$sql = "UPDATE $table_name SET
b = \"$b\"
WHERE a = \"$a\"
";
$result = mysql_query($sql,$connection)
or die("Couldn't execute query.");
$a is not changed in the table. It is an ID number. $b is changed.
I am either missing something simple, or this is really complicated and I don't have a clue.