-
Notifications
You must be signed in to change notification settings - Fork 0
/
yaowupingfen.php
50 lines (45 loc) · 2.1 KB
/
yaowupingfen.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
44
45
46
47
48
49
50
<?php
header("Content-Type:text/plain;charset=utf-8");
//定义变量接受传输过来的账号、密码
$uid = $_POST['id'];
$ukangzuanbi = $_POST['kangzuanbi'];
$ukangzuankou = $_POST['kangzuankou'];
$ukangbaisanxibi = $_POST['kangbaisanxibi'];
$ukangbaisanxikou = $_POST['kangbaisanxikou'];
$utangpizhibi = $_POST['tangpizhibi'];
$utangpizhikou = $_POST['tangpizhikou'];
$utangpizhixi = $_POST['tangpizhixi'];
$uzhiqiguankou = $_POST['zhiqiguankou'];
$uzhiqiguanxi = $_POST['zhiqiguanxi'];
$ukangzuanbit = $_POST['kangzuanbit'];
$ukangzuankout = $_POST['kangzuankout'];
$ukangbaisanxibit = $_POST['kangbaisanxibit'];
$ukangbaisanxikout = $_POST['kangbaisanxikout'];
$utangpizhibit = $_POST['tangpizhibit'];
$utangpizhikout = $_POST['tangpizhikout'];
$utangpizhixit = $_POST['tangpizhixit'];
$uzhiqiguankout = $_POST['zhiqiguankout'];
$uzhiqiguanxit = $_POST['zhiqiguanxit'];
//准备链接信息
$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 kangzuanbi = '{$ukangzuanbi}',kangzuankou = '{$ukangzuankou}',kangbaisanxibi = '{$ukangbaisanxibi}',kangbaisanxikou = '{$ukangbaisanxikou}',tangpizhibi = '{$utangpizhibi}',tangpizhikou = '{$utangpizhikou}',tangpizhixi = '{$utangpizhixi}',zhiqiguankou = '{$uzhiqiguankou}',zhiqiguanxi = '{$uzhiqiguanxi}',kangzuanbit = '{$ukangzuanbit}',kangzuankout = '{$ukangzuankout}',kangbaisanxibit = '{$ukangbaisanxibit}',kangbaisanxikout = '{$ukangbaisanxikout}',tangpizhibit = '{$utangpizhibit}',tangpizhikout = '{$utangpizhikout}',tangpizhixit = '{$utangpizhixit}',zhiqiguankout = '{$uzhiqiguankout}',zhiqiguanxit = '{$uzhiqiguanxit}' where id = '{$uid}'");
$row = mysqli_query($conn,$sql);
if($row) {
echo "提交失败";
} else {
echo "提交成功";
}
?>