-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathedituser.php
More file actions
151 lines (130 loc) · 4.54 KB
/
Copy pathedituser.php
File metadata and controls
151 lines (130 loc) · 4.54 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
include '../conn.php';
?>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- <meta name="description" content=""> -->
<!-- <meta name="author" content=""> -->
<!-- <link rel="icon" href="../../favicon.ico"> -->
<title>编辑用户</title>
<!-- Bootstrap core CSS -->
<link href="./css/bootstrap.min.css" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<!-- <link href="../../assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet"> -->
<!-- Custom styles for this template -->
<link href="./css/navbar-fixed-top.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- <script src="../../assets/js/ie-emulation-modes-warning.js"></script> -->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">后台管理</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="/admin/main.php">首页</a></li>
<li><a href="/admin/goodslist.php">商品管理</a></li>
<li class="active"><a href="/admin/userlist.php">用户管理</a></li>
<li><a href="/admin/articlelist.php">文章管理</a></li>
<li><a href="/admin/advlist.php">广告管理</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="/" >进入前台</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<br><br><br><br><br>
<table class="table">
<thead>
<tr>
<th colspan="2">编辑用户</th>
</tr>
</thead>
<tbody>
<?php
$uid = $_REQUEST['uid'];
$sql = "select * from user where id = ".$uid;
$result = $conn->query($sql);
if ($result->num_rows>0) {
while ($row = $result->fetch_assoc()) {
?>
<form class="" action="doedituser.php?uid=<?php echo $row['id']?>" method="post">
<tr>
<td>用户名:</td>
<td>
<input type="text" name="username" value="<?php echo $row['uname']?>">
</td>
</tr>
<tr>
<td>密码:</td>
<td>
<input type="text" name="password" value="<?php echo $row['pwd']?>">
</td>
</tr>
<tr>
<td>手机号:</td>
<td>
<input type="text" name="tel" value="<?php echo $row['tel']?>">
</td>
</tr>
<tr>
<td>性别:</td>
<td>
<select class="select" name="sex">
<option value="男">男</option>
<option value="女">女</option>
</select>
</td>
</tr>
<tr>
<td>邮件:</td>
<td>
<input type="text" name="email" value="<?php echo $row['email']?>">
</td>
</tr>
<tr>
<td>地址:</td>
<td>
<input type="text" name="address" value="<?php echo $row['address']?>">
</td>
</tr>
<?php
}
}
?>
<tr>
<td colspan="2">
<input type="submit" class="btn btn-success" value="更新">
</td>
</tr>
</form>
</tbody>
</table>
</div> <!-- /container -->
<script src="./js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<!-- <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script> -->
</body>
</html>