salve avrei bisogno di convertire una stringa nel codice MD5 io ho questo codice ma mi da un errore mi aiutate grazie

codice:
<HTML><HEAD><TITLE>Calcola MD5</TITLE></HEAD>

     <BODY BGCOLOR="White" TOPMARGIN="10" LEFTMARGIN="10">
         
           

           <FONT SIZE="4" FACE="ARIAL, HELVETICA">Test MD5 - php Version</FONT>
<HR>

           

Calcola MD5 della stringa inserita.

           <FORM NAME=Form1 METHOD=Post ACTION="TestMD5.php">

                Stringa: <INPUT TYPE=Text NAME=md5str>


                <INPUT TYPE=Submit VALUE="Submit">

           </FORM>

           <HR>
			<? 
if ($HTTP_POST_VARS["md5str"]!="")
{

  print "MD5(";
  print $HTTP_POST_VARS["md5str"];
  print ")=";

  
  $hash = mhash( MHASH_MD5, $HTTP_POST_VARS["md5str"]); 
  //$hash = "99888";
  print bin2hex( $hash );
  print "
";
} 

?>
	  </BODY>
</HTML>