Password a File/Directory Lite #3:
Click here to test this script.
Username: open
Password: sesame
Code:
default.asp
Highlight
<%if request.querystring("password") = "false" then%>
Invalid Password
<%end if%>
User Name:
Password:
results.asp
Highlight
<%if Ucase(request.form("username")) = "OPEN" AND Ucase(request.form("password")) = "SESAME" then%>
You have gained access.
<%else%> <%response.redirect "default.asp?password=false"%> <%end if%>