·建站首页 ·钻石 ·繁體
您的位置: 中国建站之家 -> 网站开发设计 -> ASP教程 -> ASP程序中同一个用户不允许同时登陆两次

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

作者:未知  来源:www.jz123.cn  发布时间:2005-10-5 1:47:22  发布人:admin

登陆页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
%>

将本文收藏到QQ书签与更多好友分享