I need to check if $user_entered_passidential 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
}
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With