zoukankan      html  css  js  c++  java
  • asp登录校验及登录检测

    <%

    dim name,pwd

    name=trim(request("name"))

    pwd=trim(request("pwd"))

    if name=”” or pwd=”” then

    response.Write "<script>alert('账户密码不能为空!');location='manage/main.asp'</script>"

    else

    set rs=server.createobject("adodb.recordset")

    sql="select * from admin where name='"&name&"'"

    rs.open sql,conn,1,1

    if not rs.eof then

     if pwd=rs("pwd") then

      session("mm_username")=""

      session("mm_username")=rs("name") 

    session("qx")=rs("qx") 

      response.Write "<script>alert('登陆成功');location='manage/main.asp'</script>"

     else

      Response.Write "<script language='javascript'>window.confirm('帐号和密码不正确,请返回重填!');parent.window.history.go(-1);</script>"

     end if

    else

      Response.Write "<script language='javascript'>window.confirm('用户名不正确,请返回重填!');parent.window.history.go(-1);</script>"

    end if

    end if

    %>

  • 相关阅读:
    事件记录
    C++和extern C
    中断控制器
    NAND FLASH控制器
    MMU实验
    存储管理器实验
    GPIO实验
    linux与Windows使用编译区别及makefile文件编写
    ubuntu如何为获得root权限
    VI常用命令及linux下软件
  • 原文地址:https://www.cnblogs.com/ince/p/9154738.html
Copyright © 2011-2022 走看看