Forum Moderators: coopster
<? while($row=mysql_fetch_array($result)) { ?>
<tr>
<td><? echo $row['model_name'] ?></td>
<td><input type="hidden" name="model_id" value="<?=$row['model_id']?>" /><input type="text" name="model_weight" value="<?=$row['model_weight']?>" /></td>
</tr>
<? } ?>
td>1 Series</td>
<td><input type="hidden" name="model_id" value="39" /><input type="text" name="model_weight" value="0" /></td>
</tr>
<tr>
<td>3 Series</td>
<td><input type="hidden" name="model_id" value="40" /><input type="text" name="model_weight" value="1435" /></td>
</tr>
<tr>
<td>5 Series</td>
<td><input type="hidden" name="model_id" value="41" /><input type="text" name="model_weight" value="1652" /></td>
</tr>
$query="UPDATE model SET model_weight='" . $_REQUEST['model_weight'] . "' WHERE model_id='" . $_REQUEST['model_id'] . "'";
UPDATE model SET model_weight='' WHERE model_id=''
<td><input type="hidden" name="model_id" value="39" /><input type="text" name="model_weight" value="0" /></td>
<input type="text" id="<?=$row['model_id']?>" name="model_weight" value="<?=$row['model_weight']?>" />