I need to check if $user_entered_pass
idential to $hash_val
. Please help me?
<?php
$mypass = "Rainbow";
$hash_val = md5($mypass);
echo $hash_val; //always 32 characters
$user_entered_pass = "rainbow";
?>
I need to check if $user_entered_pass
idential to $hash_val
. Please help me?
<?php
$mypass = "Rainbow";
$hash_val = md5($mypass);
echo $hash_val; //always 32 characters
$user_entered_pass = "rainbow";
?>
You can hash $user_entered_pass and compare, I use this method.
<?php
$mypass = "Rainbow";
$hash_val = md5($mypass);
echo $hash_val; //always 32 characters
$user_entered_pass = "rainbow";
if(md5($user_entered_pass) == $hash_val){
//The passwords are equal
}
?>