Encrypt and Decrypt password in PHP using md5 example tutorial

How to secure password using encode and decode method to change it into encrypted form.

PHP gives us inbuilt md5() method which will mostly used to convert passwords. Because without Encryption password it can be easily readable + understandable by any human who has access to your web hosting’s control panel. But after encryption it will change into non understandable numeric digit + alphabet form. So here is the complete step by step tutorial for Encrypt and Decrypt password in PHP using md5 example tutorial.

android-project-download-code-button

How to Encrypt and Decrypt password in PHP using md5 example tutorial.

Code for encrypt-decrypt.php file.

 <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Encrypt and Decrypt Password</title>
</head>

<body>

<?php

$password = "Admin";

$EncryptPassword = md5($password);

echo " Password Before Encryption = " . $password . '</br></br>' ;

echo " Password After Encryption = " . $EncryptPassword ;
 
?>

</body>
</html>

Screenshot:

Encrypt and Decrypt password in PHP using md5 example tutorial

Click here to download Encrypt and Decrypt password in PHP using md5 example tutorial project file with source code.

Leave a Reply

Your email address will not be published. Required fields are marked *