Esta es la idea, a ver si puedes adaptarlo:
Código PHP:
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
if(isset($_POST['Submit'])){
echo "Procesando<br/>";
$i = 0;
foreach($_POST as $key => $value){
if(!strstr($key, "valor")) continue;
echo "UPDATE tabla set campo = $value where id = $i<br/>";
$i++;
}
}
else{ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="19%" border="0">
<tr>
<td width="36%">Elemento 1 </td>
<td width="64%"><label>
<input name="valor_1" type="text" value="1" />
</label>
</td>
</tr>
<tr>
<td>Elemento 2 </td>
<td><input name="valor_2" type="text" value="3" /></td>
</tr>
<tr>
<td>Elemento 3 </td>
<td><input name="valor_3" type="text" value="4" /></td>
</tr>
<tr>
<td colspan="2"><label>
<div align="center">
<input type="submit" name="Submit" value="Enviar" />
</div>
</label></td>
</tr>
</table>
</form>
</body>
</html>
<?php } ?>
1 saludo