ASP程序中同一個用戶不允許一起登陸2次
發表時間:2024-06-07 來源:明輝站整理相關軟件相關文章人氣:
[摘要]登陸頁login.asp:<%if request.Form.count>0 then session("username")=request("username")application(session("username"...
登陸頁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
%>