设为首页
加入收藏
站内地图
旧版入口
当前位置:首页 > 站长学院 > 网络编程 > ASP

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

作者:佚名 出处:网络转载 时间:08-26 点击:

内容载入中...
登陆页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
%>
收藏本文:
】【打印页面】【推荐给朋友】【关闭窗口

站长学院

推荐信息