Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password Protection

Status
Not open for further replies.

KingofSnake

Programmer
Jul 25, 2000
73
US
I have a website where people post entryies that end up in a big text file. I wanted to password protect it, so that certain people couldn't post a message.

In otherwords, I have a form that has the following fields

Name:
Password:
Subject:
Message:

So I ask you... how could I password protect this? It doesn't need to be airtight secuirty (this is going to be a low-traffic site), but I still didn't want plain text passwords laying around in a flat-file database.
KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)
 
you can use the crypt function to create an encrypted version of each users password and write that to disk. Then, each time a user logs in, crypt the the password they enter and compare it to the version that was written to disk previously. Note that you can NOT easily un-crypt..... you have to compare the crypt'ed versions.

HTH


keep the rudder amid ship and beware the odd typo
 
Oh...there's a built in crypt function? Hehehe. That will work.

Thanks.
KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top