% Response.expires = 0 Response.expiresabsolute = Now() - 1 Response.addHeader "pragma", "no-cache" Response.addHeader "cache-control", "private" Response.CacheControl = "no-cache" %> <% ' User levels Const ewAllowAdd = 1 Const ewAllowDelete = 2 Const ewAllowEdit = 4 Const ewAllowView = 8 Const ewAllowList = 8 Const ewAllowSearch = 8 Const ewAllowAdmin = 16 If Request.Form("submit") <> "" Then bValidPwd = False ' Setup variables sUserId = Request.Form("userid") sPassWd = Request.Form("passwd") If ((UCase("College") = UCase(sUserId)) And (UCase("Coach") = UCase(sPassWd))) Then bValidPwd = True End If If bValidPwd Then ' Write cookies If Request.Form("rememberme") <> "" Then Response.Cookies("MagicProfile")("userid") = sUserId Response.Cookies("MagicProfile").Expires = Date + 365 ' Change the expiry date of the cookies here End If Session("MagicProfile_status") = "login" Response.Redirect "default.asp" Else Session("ewmsg") = "Incorrect user ID or password" End If End If %>
Login Page
<% If Session("ewmsg") <> "" Then %><%= Session("ewmsg") %>
<% Session("ewmsg") = "" ' Clear message End If %>