// You can encrypt md5() to hash values but you cannot decrypt simply
// cause its handles the security of the data so data that we encrypt will never get stolen
// the simple example is storing the password in database
$password = 'password';
if(md5($password) == md5($_POST['password'])){
echo "logged in";
}
else{
echo "password mismatched";
}