Simple : Encrypt passwords in database
The crypt function lets you encrypt text
here is how
= crypt('mypassword'); // let the salt be automatically generated
// do this to encrypt the password
//use $password in your (insert into.......) code
}
?>
For retrieval
if (crypt($_REQUEST['pass'], $password) == $password) {
echo "Password verified!";
?>
0 comments:
Post a Comment