How do you decode to encode using md5 funcation in php?

1 answer

Answer

1291547

2026-04-22 16:30

+ Follow

md5() is one-way encryption method.

Example:

$test_string="php";

$md_encoded_string=md5($test_string);

But, you can't decode the string back to php.So, if you need to check the entered string is php or not

$user_entered_string=md5($_POST['user_input']);

if($md_encoded_string == $user_entered_string)

{

echo "input matched";

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.