<% msg = "" If Request("Submit") <> "" Then If Request("username") = "guest" Then If Request("password") = "login" then ' If Request("username") = "guest" And Request("password")="login" Then Session("Valid") = Request("username") 'first protected page here response.redirect "mcd.asp" Else msg = "Invalid password. Try again!" Session("Valid") = "" End If Else msg = "Invalid user. Try again!" Session("Valid") = "" End If End If %> Password Protect
<% If msg <> "" Then %> <%End If%>
<%=msg%>
UserName:
Password: