ok, just add another submit button called "update" and do:
// assuming the table is called "table" and the primary key field is called "id" and is submitted along with the POST data
if (isset($_POST['submit']) && $_POST['submit'] == 'update')
{
foreach ($_POST as $key => $value)
{
$sql_array[$key] = "$key = '$value'";
}
mysql_query('UPDATE table SET ' . implode(',', $sql_array); . ' WHERE id = ' . $_POST['id']);
}
note: this example obviously does not do any error checking, validation, etc...