This is a fairly short and simple post! Have you aver wanted to store and encrypt data while developing in php?

If you want to store the value of the data in $password simply do this!

$enc_password = md5($password);

//To check the value agains the encrypted data you stored, do this
if($enc_password==md5($password) {
//YOUR CODE HERE
}

You can store the md5 encrypted data in a mySQL database if you like and recall it back. This encryption is easy to implement. Good luck!

No comments yet.

Would you like to login?