您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
这篇文章给大家介绍利用PHP怎么编写一个注册审核页面,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。
注册页面
<body > <h2>注册页面</h2> <form action="zhucechuli.php" method="post"> <div>用户名:<input type="text" name="uid"/> </div> <div>密码:<input type="text" name="pwd"/> </div> <div>姓名:<input type="text" name="name"/> </div> <div>性别:<input type="text" name="sex"> </div> <div>生日:<input type="text" name="birthday"> </div> <input type="submit" value="注册"/> </form> </body>

注册处理页面
<?php
$uid = $_POST["uid"];
$pwd = $_POST["pwd"];
$name = $_POST["name"];
$sex = $_POST["sex"];
$birthday = $_POST["birthday"];
include ("LZY.class.php");
$db = new LZY();
$sql = "insert into zhuce VALUES ('{$uid}','{$pwd}','{$name}','{$sex}','{$birthday}',0)";
if($db->query($sql,0))
{
header("location:zhuceyemiandenglu.php");
}
else
{
echo "注册失败!";
}登录页面
<body> <h2>页面登录</h2> <form action="zcdlchuli.php" method="post"> <div>用户名:<input type="text" name="uid"/> </div> <div>密 码:<input type="password" name="pwd"/></div> <div><input type="submit" value="登录"/> </div> </form> </body>

注册登录处理页面
<?php
$uid = $_POST["uid"];
$pwd = $_POST["pwd"];
include ("LZY.class.php");
$db = new LZY();
$sql = "select * from zhuce where uid='{$uid}'";
$arr = $db->Query($sql);
if($arr[0][1] == $pwd && !empty($pwd))
{
if($arr[0][5])
{
header("location:zcmain.php");
}
else
{
echo "该用户尚未通过审核!";
}
}
else
{
echo "登录失败!";
} 注册主界面
<body>
<h2>用户审核</h2>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td>用户名</td>
<td>姓名</td>
<td>性别</td>
<td>生日</td>
<td>操作</td>
</tr>
<?php
include("LZY.class.php");
$db = new LZY();
$sql = "select * from zhuce";
$arr = $db->Query($sql);
foreach($arr as $v)
{
$str = $v[5]?"<span style='background-color:green'>已通过</span>":"<a href='zctongguo.php?uid={$v[0]}'>通过</a>";
echo "<tr>
<td>{$v[0]}</td>
<td>{$v[2]}</td>
<td>{$v[3]}</td>
<td>{$v[4]}</td>
<td>{$str}</td>
</tr>";
}
?>
</table>
</body>
</html>
审核通过代码
<?php
$uid = $_GET["uid"];
include("LZY.class.php");
$db = new LZY();
$sql = "update zhuce set isok=1 where uid='{$uid}'";
if($db->Query($sql,0))
{
header("location:zcmain.php");
}
else
{
echo "通过失败!";
}关于利用PHP怎么编写一个注册审核页面就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。