ASP程序中同一個(gè)用戶不允許一起登陸2次
發(fā)表時(shí)間:2024-02-01 來(lái)源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]登陸頁(yè)login.asp:<%if request.Form.count>0 then session("username")=request("username")application(session("username"...
登陸頁(yè)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>
其他需要認(rèn)證的頁(yè)面index.asp:
<%
if application(session("username"))=session.SessionID then
response.Write("已經(jīng)登陸")
else
response.Write("沒(méi)有登陸")
end if
%>