-
Notifications
You must be signed in to change notification settings - Fork 0
/
feigongneng.php
43 lines (38 loc) · 1.32 KB
/
feigongneng.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
header("Content-Type:text/plain;charset=utf-8");
//定义变量接受传输过来的账号、密码
$uid = $_POST['id'];
$uNO = $_POST['NO'];
$ujunzhi = $_POST['junzhi'];
$usulv = $_POST['sulv'];
$uhuxi = $_POST['huxi'];
$uqidao = $_POST['qidao'];
$uzhongxin = $_POST['zhongxin'];
$uzhouwei = $_POST['zhouwei'];
$uyaoqianFEV = $_POST['yaoqianFEV'];
$uyaohouFEV = $_POST['yaohouFEV'];
$uyaoqianFVC = $_POST['yaoqianFVC'];
$yaohouFVC = $_POST['yaohouFVC'];
//准备链接信息
$myhost = 'localhost';
$myusername = 'phpmyadmin';
$mypassword = '';
$mydatabase = 'test';
//创建连接
$conn = mysqli_connect($myhost,$myusername,$mypassword,$mydatabase);
//设置字符集,防止出现乱码
mysqli_set_charset($conn,'utf8');
//检测连接
if($conn->connect_error) {
die("fa".$conn->connect_error);
}
echo "succ";
//执行并发送SQL语句,返回一个结果集对象
$sql = mysqli_query($conn,"update doctor set NO = '{$uNO}',junzhi = '{$ujunzhi}',sulv = '{$usulv}',huxi = '{$uhuxi}',qidao = '{$uqidao}',zhongxin = '{$uzhongxin}',zhouwei = '{$uzhouwei}',yaoqianFEV = '{$uyaoqianFEV}',yaohouFEV = '{$uyaohouFEV}',yaoqianFVC = '{$uyaoqianFVC}',yaohouFVC = '{$yaohouFVC}' where id = '{$uid}'");
$row = mysqli_query($conn,$sql);
if($row) {
echo "提交失败";
} else {
echo "提交成功";
}
?>