Syntax
HTML Code
PHP Code
<?php
if(isset($_POST['submit'])) {
$name=$_POST['name'];
$pwd=$_POST['password'];
//Before encryption
echo "Before Encryption : ".$pwd;
echo "<br>";
//After encryption
$encryptpwd=md5($pwd);
echo "After Encryption : ".$encryptpwd;
}
?>
if(isset($_POST['submit'])) {
$name=$_POST['name'];
$pwd=$_POST['password'];
//Before encryption
echo "Before Encryption : ".$pwd;
echo "<br>";
//After encryption
$encryptpwd=md5($pwd);
echo "After Encryption : ".$encryptpwd;
}
?>
Only MD5 is not secure.
ReplyDeleteUsing a unique salt per user is a very good idea.