我尝试更新像这样的多行
$ID = $_POST['ID'];
$size = count($_POST['compo']);
while ($i < $size) {
$compo = $_POST['compo'][$i];
$fill = $_POST['fill'][$i];
$query = "UPDATE Invantsion Set compon='".$compo."',Num='".$fill."' where ID='".$ID."'";
++$i;
}
帖子上的代码是从零件到...
<tr>
<td align="center"><span lang="he"><font size="2" face="Arial">
<?php
echo "<input type='hidden' name='compo[$i]' value='".$row['compon']."'>".$row['compon']."";
?>
</font></span>
</td>
<td>
<select name='fill[$i]' style="border: 1px solid #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; background-color: #FFFFFF; font-family:Arial; font-size:8pt; font-weight:bold">
<?php
$Uid = $row['id'];
require( dirname( __FILE__ ) . '/com.php' );
echo "</select>";
}
?>
while ($row = mysqli_fetch_array($result)) {
echo "<input type='hidden' name='ID' value='".$row['ID']."'>";
?>
<tr>
<td align="center"><span lang="he"><font size="2" face="Arial">
<?php
echo $row['compon'];
?>
</font></span>
</td>
<td align="center"><span lang="he"><font size="2" face="Arial">
<?php
echo $row['Num'];
?>
</font></span>
</td>
</tr>
如果我得到错误500或只是最后一个结果应该是什么 UPDATE Invantsion Set compon ='DECODERS',Num =''其中ID = '30' 如果我尝试使代码循环后只有单词后设置它没有什么都不做.. 任何人?