Instead of trying to pass the md5 value while calculating it, you should calculate it first, then send it.
Example:
$pw1value=md5($pw);
print "<a href='..../text/contact.php3?pw1=$pw1value&email=$email'>";
You may also use:
print "<a href='.../text/contact.php3?pw1=".md5($pw)."&email=$email'>";
Hope this helps.
Mike R