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

登陆页login.asp:

1   
2if request.Form.count>0 then   
3session("username")=request("username")   
4application(session("username"))=session.SessionID   
5response.Redirect("index.asp")   
6end if   
1<form action="" method="post">
2<input name="username" type="text"/><input type="submit"/>
3</form>

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

1   
2if application(session("username"))=session.SessionID then   
3response.Write("已经登陆")   
4else   
5response.Write("没有登陆")   
6end if   
Published At
Categories with Web编程
Tagged with
comments powered by Disqus