Forum Moderators: coopster

Message Too Old, No Replies

newbie: need to cross-check flat file for passwords

         

davidhorn01

10:51 am on Nov 27, 2003 (gmt 0)

10+ Year Member



Hi group -

I'm new to this group, so if this is not the right place for this question, I apologise.

I have a form on my site which writes to a flat file. The form collects usernames and passwords. Is there a script out there which can then reference this flat file through a login screen? Basically, someone logs on and the action of that checks that their password etc. exists in the flat file.

Any help would be much appreciated.

David

jatar_k

5:52 pm on Nov 28, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



hello David,

This isn't too hard to do.

Essentially the steps are
1. show login form
2. user submits form
3. do some error checking on the form data
4. open a pointer to the auth file
5. search through the file looking for the line containing the username
6. if it exists compare the password you got from the form to the one you have stored in the auth file
7. if it doesn't match display error
8. if all is weel log them in