PHP 表单提交多行数据,显示多个submit

echo "<table border=1 class="imagetable" >"; //使用表格格式化数据
echo "<form action='tanchutext.php' method='POST' id='form1'>";
echo "<tr><th>小区编码</th><th>小区名称</th><th>工单类型</th><th>可选包名称</th><th width=70px>接入方式</th><th>地理位置</th><th width=50px>联系人</th><th>宽带账号</th><th>联系电话</th><th>受理工号</th><th>受理人</th><th width=80px>是否同时有互联网电视</th><th width=80px>预约时间</th><th width=80px>备注</th><th>预约人员</th><th width=80px>派单时间</th><th width=80px>生成预约短信</th></tr>";

while($row=mysql_fetch_array($result)) //遍历SQL语句执行结果把值赋给数组
{
echo "<tr id='t1' >";
echo "<td>".$row[xqbm]."</td>"; //小区编码
echo "<td>".$row[xqmc]." </td>"; //小区名称
echo "<td>".$row[gdlx]." </td>"; //工单类型
echo "<td><input type='hidden' name='kxbmc' value='$row[kxbmc]'>".$row[kxbmc]." </td>"; //可选包名称
echo "<td>".$row[jrfs]." </td>"; //接入方式
echo "<td><input type='hidden' name='dlwz' value='$row[dlwz]'>".$row[dlwz]." </input></td>"; //地理位置
echo "<td><input type='hidden' name='lxr' value='$row[lxr]'>".$row[lxr]." </input></td>"; //联系人
echo "<td><input type='hidden' name='kdzh' value='$row[kdzh]'>".$row[kdzh]." </input></td>"; //宽带账号
echo "<td><input type='hidden' name='lxdh' value='$row[lxdh]'>".$row[lxdh]."</input> </td>"; //联系电话
echo "<td><input type='hidden' name='slgh' value='$row[slgh]'>".$row[slgh]." </input></td>"; //受理工号
echo "<td><input type='hidden' name='slr' value='$row[slr]'>".$row[slr]."</input> </td>"; //受理人
echo "<td>".$row[sftsyhlwds]." </td>"; //是否同时有互联网电视

echo "<td><input name='yydate' class='tcal' id=shijian type='date'></input></td>";

echo "<td><input name='bz' type='text'></input></td>";
echo "<td><input name='yyry' id=in type='text'></input></td>";
echo "<td><input name='pddate' class='tcal' id=shijian type='date'></input></td>";
echo "<td><input type='submit' name='submit' value='发送短信' ></td>";      //这个input的type=“submit”,使用了提交表单的按钮,放在while循环中,可以提交不同行的数据


echo "</tr>";
}
echo "</form>";       //要想提交多行数据,必须把</form>放在while循环的外边;
echo "</table>";

原文地址:https://www.cnblogs.com/hqutcy/p/5705898.html