zoukankan      html  css  js  c++  java
  • 每日总结6.4

    <?php
    //验证登陆信息
    session_start();
    include_once 'conn.php';
    //if($_POST['submit']){
    $login=$_POST["login"];
    $username=$_POST['username'];
    $pwd=$_POST['pwd'];
    $cx=$_POST['cx'];
    $yzm=$_POST['yzm'];
    //$userpass=md5($userpass);
    if($login=="1")
    {
    if($yzm==$_SESSION['regsession_code'])
    {

    }
    else
    {
    echo "<script language='javascript'>alert('请输入正确验证码!');location.href='login.html';</script>";
    die;
    }
    if ($username!="" && $pwd!="" && $yzm!="")
    {
    if($cx=="管理员"){$sql="select * from allusers where username='$username' and pwd='$pwd'";}

    $query=mysql_query($sql);
    $rowscount=mysql_num_rows($query);
    if($rowscount>0)
    {
    $_SESSION['username']=$username;
    if($cx=="管理员"){
    $_SESSION['cx']=mysql_result($query,0,"cx");
    }
    else
    {
    $_SESSION['cx']=$cx;
    }
    //$row = mysql_fetch_row($query)
    //echo $_SESSION['cx'];
    echo "<script language='javascript'>alert('登陆成功!');location='main.php';</script>";
    }
    else
    {
    echo "<script language='javascript'>alert('用户名或密码错误!');history.back();</script>";
    }
    }
    else
    {
    echo "<script language='javascript'>alert('请输入完整!');history.back();</script>";
    }
    }

    //}
    ?>


  • 相关阅读:
    Binary Trees
    [POJ] String Matching
    Tree
    Maxmum subsequence sum problem
    poj 2104 划分树
    poj 2486 树形dp
    poj 1848 树形dp
    hdu 4578 线段树
    hdu 4585 set应用
    hdu 2412 树形DP
  • 原文地址:https://www.cnblogs.com/wanghaoning/p/14914935.html
Copyright © 2011-2022 走看看