禁止同账号同时多人登陆?

aqsnw 2005-04-16 11:52:45
禁止同账号同时多人登陆,给点思路!!!
...全文
120 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
kekecncom 2005-04-16
  • 打赏
  • 举报
回复
ASP程序中同一个用户不允许同时登陆两次
登陆页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
%>
lonkil 2005-04-16
  • 打赏
  • 举报
回复
登录的时候,在数据库中记一个标记.
退出时清空
gxlxgyb_37 2005-04-16
  • 打赏
  • 举报
回复
上三,为表
gxlxgyb_37 2005-04-16
  • 打赏
  • 举报
回复
用户名中有一字段用来标记用记的登录状态,用户登录的时候就判断

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧