php 同时提交多条记录
表单页<inputtype=textname="uptjiage[]"value=[field:tjiage/]></span><spanclass=s4><inputt...
表单页
<input type=text name="uptjiage[]" value=[field:tjiage/]></span>
<span class=s4><input type=text name="uppjiage[]" value=[field:pjiage/]></span>
2个 参数 多条记录
我想批量修改后 按提交 然后全部数据都更新
<?php
$host = "localhost";
$user = "user";
$pass = "pass";
$db = "data";
$conn=mysql_connect($host,$user,$pass);
mysql_select_db($db,$conn);
mysql_query("SET NAMES 'gbk'");
?>
<?php
$upaid=$_POST['upaid'];
$uptjiage=$_POST['uptjiage'];
$uppjiage=$_POST['uppjiage'];
foreach($upaid as $key=>$aid){
$up=mysql_query("update dede_addon14 set tjiage='$uptjiage[$key]' where aid='$aid");
}
?>
我QQ 66763660 希望大仙可以帮我一下 展开
<input type=text name="uptjiage[]" value=[field:tjiage/]></span>
<span class=s4><input type=text name="uppjiage[]" value=[field:pjiage/]></span>
2个 参数 多条记录
我想批量修改后 按提交 然后全部数据都更新
<?php
$host = "localhost";
$user = "user";
$pass = "pass";
$db = "data";
$conn=mysql_connect($host,$user,$pass);
mysql_select_db($db,$conn);
mysql_query("SET NAMES 'gbk'");
?>
<?php
$upaid=$_POST['upaid'];
$uptjiage=$_POST['uptjiage'];
$uppjiage=$_POST['uppjiage'];
foreach($upaid as $key=>$aid){
$up=mysql_query("update dede_addon14 set tjiage='$uptjiage[$key]' where aid='$aid");
}
?>
我QQ 66763660 希望大仙可以帮我一下 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询