凹丫丫网络社区's Archiver

Amm 发表于 2008-5-17 15:57

ASP程序中同一个用户不允许同时登陆两次

<DIV class=NewsContent id=NewsContentLabel>登陆页login.asp:<BR>&lt;%<BR>if request.Form.count&gt;0 then <BR>session("username")=request("username")<BR>application(session("username"))=session.SessionID<BR>response.Redirect("index.asp")<BR>end if<BR>%&gt;<BR>&lt;form method=post action=""&gt;<BR>&lt;input type="text" name="username"&gt;&lt;input type="submit"&gt;<BR>&lt;/form&gt;<BR><BR><BR>其他需要认证的页面index.asp:<BR>&lt;%<BR>if application(session("username"))=session.SessionID then<BR>response.Write("已经登陆")<BR>else<BR>response.Write("没有登陆")<BR>end if<BR>%&gt; <BR></DIV>

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.