View Single Post
  #1 (permalink)  
Old 08-20-09, 07:27 AM
ElphieFabalaFae's Avatar
ElphieFabalaFae ElphieFabalaFae is offline
New Member
 
Join Date: Aug 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Checking Passwords from TextFiles

Code:
<%
IF Request.form("username")="Joe" AND Request.form("password")="please" THEN
%>
<%
Session("permission")="YES"
Session("username")="Joe"
%>
I have been using the above to test logins and display 'member only' pages to those that have permissions. However, I now need to proceed to checking usernames and passwords against information stored in a text file. The text file has the username, password and email stored for each individual. File is called users.txt.

I am at a loss as to where to start in order to get the code to check the file. I assume the Request.form("username")= stays in place, but I have no idea where to start in calling and checking the file. Any tips, pointers, or sample codes would be gratefully accepted!

This is a purely academic exercise while I get to grips with calling information and checking information against text files. I know keeping such information in a text file is unsafe and unwise.
Reply With Quote