Password Protecting Your Site - What's Wrong?

Results 1 to 2 of 2

Thread: Password Protecting Your Site - What's Wrong?

  1. #1
    Join Date
    Dec 1969

    Default Password Protecting Your Site - What's Wrong?

    Does anybody know how to fix a bug in the article by Rob Taylor on "Password Protecting Your Site"? It&#039s about viewing a protected a page by first submitting the email address and password. Once a person enters the correct credentials, that information is processed by a password.asp page which contains the following script: <BR>&#060;% <BR> Dim mailaddress = request.form("email")<BR> Dim userkey = request.form("pwd")<BR><BR> Session("user")=mailaddress<BR> Session("id")=userkey<BR><BR> set pwdObj = Server.CreateObject("Scripting.FileSystemObject")< BR> set gtFile = pwdObj.openTextFile(Server.MapPath("password.txt") )<BR><BR> While not gtFile.AtEndOfStream<BR> if gtFile.ReadLine=Session("user") & " " & Session("id") Then<BR> gtfile.close<BR> Response.Redirect "ValidUser.asp"<BR> End If<BR> WEND<BR><BR> Response.Redirect "invalid.asp"<BR><BR>%&#062; <BR><BR>Well, the thing is that when I submit the correct email address and password, the browser dispalys a message of: <BR><BR>- An end of instruction was expected <BR><BR>password.asp, line 2 <BR><BR>Dim mailaddress = request.form("email") -<BR><BR>Should I add an extra code to the second line so that it can work? What should I do? <BR><BR>Please help me -and forgive my ignorance-<BR><BR>Thank you very much.<BR><BR>Ed

  2. #2
    Join Date
    Dec 1969

    Default CROSS POST - already answered

    in the other forum.<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts