the crypt() funtion in PHP

Posted by: §intå×

the crypt() funtion in PHP - 03/03/03 03: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
Code:
 
<form action="process.php" METHOD="POST">
<input type="password" name="reg_password">

 
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.

Code:
 
$reg_password = crypt("$reg_password", "$1$salthere^");
 
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.
Posted by: Gremelin

Re: the crypt() funtion in PHP - 03/03/03 03:24 AM

You figured this out cas of UBB.Threads didn't you ...
Posted by: §intå×

Re: the crypt() funtion in PHP - 03/03/03 03:29 AM

Nah actualy a side project for someone in the family.