5月23 注册审核

注册数据显示页面zhuce.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=utf-8" />
<title>注册审核</title>
</head>

<body>
<h1>注册</h1>
<form action="zhucechuli.php" method="post">
<div>用户名:<input type="text" name="uid" /></div><br />

<div>密码:&nbsp;&nbsp;<input type="text" name="pwd" /></div><br />

<div>姓名:&nbsp;&nbsp;<input type="text" name="name" /></div><br />

<div>性别:&nbsp;&nbsp;<input type="text" name="sex" /></div><br />

<div>生日:&nbsp;&nbsp;<input type="text" name="birthday" /></div><br />

<div><input type="submit" value="注册" />&nbsp;&nbsp;&nbsp;&nbsp;
<a href="main.php"><input type="button" value="查看" /></a>
</div>

</form>
</body>
</html>
View Code

 

注册数据处理页面zhucechuli.php

<?php

$uid = $_POST["uid"];
$pwd = $_POST["pwd"];
$name = $_POST["name"];
$sex = $_POST["sex"];
$birthday = $_POST["birthday"];
//处理性别
$s = 1;
if($sex=="女")
{
    $s = 0;    
}

include("../DBDA.php");
$db = new DBDA();

$sql = "insert into users values('{$uid}','{$pwd}','{$name}',{$s},'{$birthday}','',false)";
//echo $sql;

if($db->Query($sql,1))
{
    header("location:zhuce.php");    
}
View Code

 页面显示效果

登录数据显示页面login.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=utf-8" />
<title>注册审核</title>
</head>

<body>
<h1>登录</h1>
<form action="loginchuli.php" method="post">
<div>用户名:<input type="text" name="uid" /></div><br />

<div>密&nbsp;&nbsp;码:<input type="text" name="pwd" /></div><br />

<div><input type="submit" value="登录" />&nbsp;&nbsp;&nbsp;&nbsp;
<a href="main.php"><input type="button" value="前去审核" /><a></div>
</form>
</body>
</html>
View Code

 

登录数据处理页面loginchuli.php

<?php
session_start();
$uid = $_POST["uid"];
$pwd = $_POST["pwd"];

include("../DBDA.php");
$db = new DBDA();

$sql = "select count(*) from users where Uid = '{$uid}' and Pwd = '{$pwd}' and Isok =true";
$r = $db->StrQuery($sql);

if($r==1)
{
    $_SESSION["uid"] = $uid;
    header("location:main.php");
}
else
{
    header("location:login.php");
}
View Code

 页面显示效果

审核数据显示页面main.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=utf-8" />
<title>注册审核</title>
</head>

<body>
<h1>审核</h1>
<table width="100%" cellpadding="0" cellspacing="0" border="1">
    <tr>
        <td>姓名</td>
        <td>性别</td>
        <td>生日</td>
        <td>操作</td>
    </tr>
<?php
  
include("../DBDA.php");
$db = new DBDA();

$sql = "select * from users";    
$attr = $db->Query($sql);

foreach($attr as $v)
{
    //审查的状态
    $zt = "";
    if($v[6])
    {
        $zt = "<span style='color:red'>已通过审核&nbsp;&nbsp;<a href='chexiao.php?uid={$v[0]}'>撤销</a></span>";
    }
    else
    {
        $zt = "<a href='mainchuli.php?uid={$v[0]}'>审核</a>";
    }
    echo "<tr>
            <td>{$v[2]}</td>
            <td>{$v[3]}</td>
            <td>{$v[4]}</td>
            <td>{$zt}</td>
        </tr>";    
}


?> 
</table>
</body>
</html>
View Code

 

审核数量处理页面mainchuli.php

<?php

$uid = $_GET["uid"];

include("../DBDA.php");
$db = new DBDA();

$sql = "update users set Isok = true where Uid = '{$uid}'";
if($db->Query($sql,1))
{
    header("location:main.php");    
}
else
{
    echo "审核未通过";    
}
View Code

 

撤销审核处理页面chexiao.php

<?php

$uid = $_GET["uid"];

include("../DBDA.php");
$db = new DBDA();

$sql = "update users set Isok = false where Uid = '{$uid}'";
if($db->Query($sql,1))
{
    header("location:main.php");    
}
else
{
    echo "撤销失败";    
}
View Code

 页面显示效果

转载于:https://www.cnblogs.com/Duriyya/p/5519441.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值