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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using PASSWORD() function in PHP scripts

Status
Not open for further replies.

lstephane

Programmer
Nov 19, 2002
35
CA
Hi,

I need to encrypt my passwords into the databse.

How can I compare the password entry from the html form with the encrypted one from the database ???

Thanks ! Stéphane Lambert, Analyst/Programmer - BI Specialist
Info Quest (IQ), Data Warehouse System
McKesson Canada Corporation

EMail: stephane.lambert@mckesson.ca
 
if you have used the password() function when inserting the record, you could compare the user's entry by somerthing like:

$rs = "SELECT * from TABLE where password = password(\"$mypassword\")";

this would return records where the password the user had entered (mypassword) matched the encrypted entry (password) in the table.

You could also look at md5() function which apparently is much more secure and done iin the same way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top