<?php include "i_conn.php" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户列表</title>
</head>
<body>
<h3>用户列表</h3>
<a href="useredit.php">添加用户</a>
<?php
$strSQL = "select * from Users order by UserID desc";
$rst=$pdo->query($strSQL);
?>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td>用户编号</td>
<td>用户名</td>
<td>密码</td>
<td>真实姓名</td>
<td>编辑</td>
</tr>
<?php
while($rstInfo=$rst->fetch()){
?>
<tr>
<td><?php echo $rstInfo["UserID"]; ?></td>
<td><?php echo $rstInfo["UserName"]; ?></td>
<td><?php echo $rstInfo["UserPwd"]; ?></td>
<td><?php echo $rstInfo["RealName"]; ?></td>
<td>
<a href="useredit.php?Opt=1&UserID=<?php echo $rstInfo["UserID"]; ?>">修改</a> |
<a href="userdelete.php?Opt=1&UserID=<?php echo $rstInfo["UserID"]; ?>">删除</a>
</td>
</tr>
<?php
}
?>
</table>
</body>
</html>
PHP PDO MySql 用户列表
最新推荐文章于 2021-05-14 12:42:56 发布