Hi,
I am trying to retrieve the id sent to the following script but for some reason it will not work, the correct names have been used etc. Anyone got any ideas !??
Note: the file checks a username and password against a text file, if OK redirects to page otherwise redirects to invalid password page.
<%Response.Buffer = True %>
<% Dim idnum
idnum = Request.querystring ("numb"
' Connects and opens the text file
' DATA FORMAT IN TEXT FILE= "username<SPACE>password"
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject"
Set MyTextFile=MyFileObject.OpenTextFile(Server.MapPath("\pass" & "\passwords.txt"
' Scan the text file to determine if the user is legal
WHILE NOT MyTextFile.AtEndOfStream
' If username and password found
IF MyTextFile.ReadLine = Request.form("username" & " " & Request.form("password" THEN
' Close the text file
MyTextFile.Close
' Go to login success page
Session("GoBack"=Request.ServerVariables("SCRIPT_NAME"
'Response.Redirect (loc)
Response.Redirect "../orange_project_edit.asp?num=" & idnum
Response.end
END IF
WEND
' Close the text file
MyTextFile.Close
' Go to error page if login unsuccessful
Session("GoBack"=Request.ServerVariables("SCRIPT_NAME"
Response.Redirect "invalid_orng_editProj.asp?num" & idnum
Response.end
%>
Thanks
I am trying to retrieve the id sent to the following script but for some reason it will not work, the correct names have been used etc. Anyone got any ideas !??
Note: the file checks a username and password against a text file, if OK redirects to page otherwise redirects to invalid password page.
<%Response.Buffer = True %>
<% Dim idnum
idnum = Request.querystring ("numb"
' Connects and opens the text file
' DATA FORMAT IN TEXT FILE= "username<SPACE>password"
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject"
Set MyTextFile=MyFileObject.OpenTextFile(Server.MapPath("\pass" & "\passwords.txt"
' Scan the text file to determine if the user is legal
WHILE NOT MyTextFile.AtEndOfStream
' If username and password found
IF MyTextFile.ReadLine = Request.form("username" & " " & Request.form("password" THEN
' Close the text file
MyTextFile.Close
' Go to login success page
Session("GoBack"=Request.ServerVariables("SCRIPT_NAME"
'Response.Redirect (loc)
Response.Redirect "../orange_project_edit.asp?num=" & idnum
Response.end
END IF
WEND
' Close the text file
MyTextFile.Close
' Go to error page if login unsuccessful
Session("GoBack"=Request.ServerVariables("SCRIPT_NAME"
Response.Redirect "invalid_orng_editProj.asp?num" & idnum
Response.end
%>
Thanks