zoukankan      html  css  js  c++  java
  • ASP程序中同一个用户不允许同时登陆两次

    同一个用户不允许同时登陆两次实现办法一、 
    登陆页login.asp: 
    <% 
    if request.Form.count>0 then 
    session("username")=request("username") 
    application(session("username"))=session.SessionID 
    response.Redirect("index.asp") 
    end if 
    %> 
    <form method=post action=""> 
    <input type="text" name="username"><input type="submit"> 
    </form> 

    其他需要认证的页面index.asp: 

    <% 
    if application(session("username"))=session.SessionID then 
    response.Write("已经登陆") 
    else 
    response.Write("没有登陆") 
    end if 
    %>同一个用户不允许同时登陆两次实现办法一、 
    登陆页login.asp: 
    <% 
    if request.Form.count>0 then 
    session("username")=request("username") 
    application(session("username"))=session.SessionID 
    response.Redirect("index.asp") 
    end if 
    %> 
    <form method=post action=""> 
    <input type="text" name="username"><input type="submit"> 
    </form> 

    其他需要认证的页面index.asp: 

    <% 
    if application(session("username"))=session.SessionID then 
    response.Write("已经登陆") 
    else 
    response.Write("没有登陆") 
    end if 
    %>
    http://www.corange.cn/archives/2008/02/223.html
  • 相关阅读:
    简单破解.net(C#)程序
    URL和URI
    Java JDK安装和配置(Windows)
    函数式编程语言
    Http
    drf 序列化获取商品分类数据
    npm install 安装依赖报错
    27-----BBS论坛
    26-----BBS论坛
    25-----BBS论坛
  • 原文地址:https://www.cnblogs.com/zerogo/p/2209293.html
Copyright © 2011-2022 走看看