zoukankan      html  css  js  c++  java
  • 注册审核

    登录
    <body>
        
       <form action="loginchuli.php" method="post">
           <div>用户名:<input type="text" name="uid" /></div>
        <div>密码:<input type="text" name="pwd" /></div>
        
        <div><input type="submit" value="登录" /></div>
       </form>
        
    登陆处理
    <?php $uid = $_POST["uid"]; $pwd = $_POST["pwd"];
    <body>
    
    <h1>注册审核</h1>
    
    <table width="100%" border="1" cellpadding="0" cellspacing="0">
        <tr>
            <td>用户名</td>
            <td>姓名</td>
            <td>状态</td>
        </tr>
        
        <?php
        include("../DBDA.class.php");
        $db = new DBDA();
        
        $sql = "select * from users";
        $attr = $db->Query($sql);    
        
        foreach($attr as $v)
        {
            //处理状态
            $zt = "";
            if($v[5]==1)
            {
                $zt = "<span style='color:green'>已通过</span>";
            }
            else
            {
                $zt = "<a href='shenhe.php?u={$v[0]}'>审核</a>";
            }
            
            echo "<tr><td>{$v[0]}</td><td>{$v[2]}</td><td>{$zt}</td></tr>";
        }
        ?>
        
    </table>
    
    
    
    
    
    include("../DBDA.class.php");
    $db = new DBDA();
    
    $sql = "select pwd from users where uid='{$uid}'";
    
    $mm = $db->StrQuery($sql);
    
    if($pwd != "" && $pwd==$mm)
    {
        $ssh = "select isok from users where uid='{$uid}'";
        $n = $db->StrQuery($ssh);
        if($n==1)
        {
            header("location:main.php");
        }
        else
        {
            echo "该账号还未经过审核";
        }
    }
    else
    {
        echo "用户名或密码错误";
    }
    <?php
    include("../DBDA.class.php");
    $db = new DBDA();
    
    $uid = $_GET["u"];
    
    $sql = "update users set isok=1 where uid='{$uid}'";
    
    $db->Query($sql,0);
    
    header("location:main.php");
    
    
    
     
  • 相关阅读:
    内存泄露了么: Handlers & Inner Classes
    SVN update: 'skipped' message
    Eclipse Java注释模板设置详解
    Classpath entry org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER will not be exported
    简单的SocketExample
    Struts2+JSON+JQUERY DEMO
    Checked&Unchecked Exception
    js垃圾回收机制
    Vue中路由守卫
    Vue中Watch和Computed的差异
  • 原文地址:https://www.cnblogs.com/benpaodegegen/p/6038119.html
Copyright © 2011-2022 走看看