您的位置:首页 > 编程语言 > ASP

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

2006-07-04 14:28 267 查看
登陆页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://dev.csdn.net/author/housisong/6c187760-b6a3-4836-a809-22cde55594e8.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: