PHP语言 -- 注册审核

<body>
<h1>注册审核</h1>
<table border="1" width="100%" cellpadding="0" cellspacing="0">

<tr>
<td>用户名</td>
<td>姓名</td>
<td>性别</td>
<td>生日</td>
<td>状态</td>
</tr>
<?php
include "DBDA.php";

$db = new DBDA();

$sql = "select * from Users";

$attr = $db->Query($sql);

for($i=0;$i<count($attr);$i++)
{
echo "<tr>
<td>{$attr[$i][0]}<td>
<td>{$attr[$i][2]}<td>
<td>{$attr[$i][3]}<td>
<td>{$attr[$i][4]}<td>";

if($attr[$i][6])
{
echo "<td>已通过</td>";
}
else
{
echo "<td><a href='shenhe.php?uid={$attr[$i][0]}'>审核</a></td>";
}

echo "</tr>";
}

?>
</table>


</body>

shenhe.php

$uid = $_GET["uid"];

include "DBDA.php";

$db = new DBDA();

$sql = "update Users set IsOk = true where Uid = '{$uid}'";

$db->Query($sql,0);

header("location:main.php");

 

posted on 2016-04-29 09:35  一方通行o  阅读(139)  评论(0编辑  收藏  举报

导航