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

    注册页面

    <h1>注册</h1>
    <form action="zcchuli.php" method="post">
    <div>用户名:<input type="text" name="yhm" /></div>
    <div>密码:<input type="text" name="mm" /></div>
    <div>姓名:<input type="text" name="xm" /></div>
    <div>性别:<input type="text" name="xb" /></div>
    <div>生日:<input type="text" name="sr" /></div>
    <input type="submit" value="注册" />

    </form>

    注册处理页面

    <?php
    $uid=$_POST["yhm"];
    $pwd=$_POST["mm"];
    $name=$_POST["xm"];
    $sex=$_POST["xb"];
    $sr=$_POST["sr"];
    if($sex=="男")
    $sex=1;
    else
    $sex=0;
    include("../DBDA.php");
    $db=new DBDA();
    $sql="insert into dl values(false,'{$sr}',{$sex},'{$name}','{$pwd}','{$uid}')";
    if($db->Query($sql,0))
    {
    header("location:denglu.php");
    }

    登录页面

    <h1>登录</h1>
    <form action="dlchuli.php" method="post">
    <div>用户名<input type="text" name="yhm" /></div>
    <div>密码<input type="text" name="mm" /></div>
    <input type="submit" value="登录" />
    </form>

    登录处理页面

    <?php
    session_start();
    $uid=$_POST["yhm"];
    $pwd=$_POST["mm"];
    include("../DBDA.php");
    $db=new DBDA();
    $sql="select count(*) from dl where uid='{$uid}' and pwd='{$pwd}' and isok=true";
    $jg=$db->StrQuery($sql);
    if($jg==1)
    {
    $_SESSION["uid"]=$uid;
    header("location:zhu.php");
    }
    else
    {
    header("location:denglu.php");
    }

    主页面

    <h1>主页面</h1>
    <table width="100%" border="1" cellpadding="0" cellspacing="0">
    <tr>
    <td>姓名</td>
    <td>性别</td>
    <td>生日</td>
    <td>状态</td>

    </tr>
    <?php
    include("../DBDA.php");
    $db=new DBDA();
    $sql="select * from dl";
    $jieguo=$db->Query($sql);
    foreach($jieguo as $v)
    {
    $isok="";
    if($v[0])
    {
    $isok="审核通过<a href='zxchuli.php?uid={$v[5]}'>注销</a>";
    }
    else
    {
    $isok="<a href='shchuli.php?uid={$v[5]}'>审核</a>";
    }
    echo"<tr>
    <td>{$v[3]}</td>
    <td>{$v[2]}</td>
    <td>{$v[1]}</td>
    <td>{$isok}</td>
    </tr>";
    }
    ?>
    </table>

    审核处理页面

    <?php
    $uid=$_GET["uid"];
    include("../DBDA.php");
    $db=new DBDA();
    $sql="update dl set isok=true where uid='{$uid}'";
    if($db->Query($sql,0))
    {
    header("location:zhu.php");
    }
    else
    {
    echo"审核失败";
    }

    注销处理页面

    <?php
    $uid=$_GET["uid"];
    include("../DBDA.php");
    $db=new DBDA();
    $sql="update dl set isok=false where uid='{$uid}'";
    if($db->Query($sql,0))
    {
    header("location:zhu.php");
    }
    else
    {
    echo"注销失败";
    }

  • 相关阅读:
    ireport +jasperreport 中文不能显示
    ireport +jasperreport 中文不能显示
    JDBC的批量处理语句
    tattoo实现adhoc连接
    tattoo实现adhoc连接
    网络突然掉线或者不小心putty被关掉等等原因 造成安装过程被中断怎么办?
    网络突然掉线或者不小心putty被关掉等等原因 造成安装过程被中断怎么办?
    Linux SSH命令大全,新手必看SSH命令
    修改SSH端口和修改vsftpd端口更安全
    Linux SSH命令大全,新手必看SSH命令
  • 原文地址:https://www.cnblogs.com/wcc731546227/p/5519973.html
Copyright © 2011-2022 走看看