Jump to content

crypt()


182x

Recommended Posts

Hey guys, I have developed a login script where the users passwords are stored in the db using the crypt method of encryption. I was just wondering is the following the correct way to assign the encrypted data to a variable so it can be compared in a query? or will this method fail as it is one way encryption?

 

$password  = crypt($_POST['password'], 'salthere);
//sql here i.e select * from user where uname=$uname and password=$password;

Link to comment
https://forums.phpfreaks.com/topic/61913-crypt/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.