php更新数据库但是无法执行update语句 10
<html><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"><title>报修...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<title>报修</title>
</head>
<body>
<?php
$bxid=$_POST['bxid'];
$gzsbid=$_POST['gzsbid'];
$wxyzh=$_POST['wxyzh'];
$zt=$_POST['zt'];
$feiyong=$_POST['feiyong'];
$time = date('y-m-d h:i:s',time());
$link=mysqli_connect('127.0.0.1','root','123456','bysj');
if(!$link) {
die('Connect Error:'.mysqli_connect_error());
}
$sql="update wxjlb set wxzt = '{$zt}' , wxcost = '{$feiyong}' where bxid = '{$bxid}'";
//执行sql 语句
$result = mysqli_query($link,$sql);
//获得受影响的行数
if (!$result) {
die('Query Error:'.$sql);
}else{
echo "提交成功,点击<a href='jilu.html'>这里</a>返回";
}
?>
</body>
</html> 展开
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<title>报修</title>
</head>
<body>
<?php
$bxid=$_POST['bxid'];
$gzsbid=$_POST['gzsbid'];
$wxyzh=$_POST['wxyzh'];
$zt=$_POST['zt'];
$feiyong=$_POST['feiyong'];
$time = date('y-m-d h:i:s',time());
$link=mysqli_connect('127.0.0.1','root','123456','bysj');
if(!$link) {
die('Connect Error:'.mysqli_connect_error());
}
$sql="update wxjlb set wxzt = '{$zt}' , wxcost = '{$feiyong}' where bxid = '{$bxid}'";
//执行sql 语句
$result = mysqli_query($link,$sql);
//获得受影响的行数
if (!$result) {
die('Query Error:'.$sql);
}else{
echo "提交成功,点击<a href='jilu.html'>这里</a>返回";
}
?>
</body>
</html> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询