PDA

View Full Version : Password protecting pages with ASP


jcx1028
11-21-2008, 09:37 PM
I would like to have a section of a site I'm working on only be accessible to those with valid logins & passwords. While, admittedly, my knowledge of ASP and/or PHP is minimal, my knowledge of MySQL is nonexistent, so I figured I'd try the ASP route. I stumbled upon a script (http://www.kuam.com/techtalk/passwordprotection.htm) that consists of a login page, a login-challenge page and a secured page.

So far, I've got these to work without a problem. However, I have not been able to determine if I'm able to support multiple logins/passwords with this script, or how to go about doing so. Here's the login-challenge page as it is now...

<%
If (Request("USERNAME") <> "guest") Or (Request("PASSWORD") <> "opensaysme") Then
Response.Redirect("vendors.asp?failedlogin=true&USERNAME=" & Request("USERNAME"))
End If
Response.Write Chr(13) ' prints out a carriage return as output in case the page is browsed to directly
%>

Is there any way to work with this to solve my dilemma?

Thanks in advance for your help...