the crypt() funtion in PHP - 03/03/03 08:14 AM
Okay,
So you want to encrypt your password for safe storage. now how do we do this? Use crypt()
The way this works is like so
User fills out HTML form
the variable $reg_password is then sent to process.php to, yup process the info..
In the process.php script you will have something like this.
This will encrypt your variable $reg_password into an MD5 hashing. Just use the same salt to encrypt thier password when they login everytime and you are set.
So you want to encrypt your password for safe storage. now how do we do this? Use crypt()
The way this works is like so
User fills out HTML form
Code
<form action="process.php" METHOD="POST"> <input type="password" name="reg_password">
In the process.php script you will have something like this.
Code
$reg_password = crypt("$reg_password", "$1$salthere^");