-
Notifications
You must be signed in to change notification settings - Fork 15
/
18.user.php
26 lines (25 loc) · 1.06 KB
/
18.user.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
<html>
<head><title>使用者管理</title></head>
<body>
<?php
error_reporting(0);
session_start();
if (!$_SESSION["id"]) {
echo "請登入帳號";
echo "<meta http-equiv=REFRESH content='3, url=2.login.html'>";
}
else{
echo "<h1>使用者管理</h1>
[<a href=14.user_add_form.php>新增使用者</a>] [<a href=11.bulletin.php>回佈告欄列表</a>]<br>
<table border=1>
<tr><td></td><td>帳號</td><td>密碼</td></tr>";
$conn=mysqli_connect("db4free.net", "immust", "immustimmust", "immust");
$result=mysqli_query($conn, "select * from user");
while ($row=mysqli_fetch_array($result)){
echo "<tr><td><a href=19.user_edit_form.php?id={$row['id']}>修改</a>||<a href=17.user_delete.php?id={$row['id']}>刪除</a></td><td>{$row['id']}</td><td>{$row['pwd']}</td></tr>";
}
echo "</table>";
}
?>
</body>
</html>