chewdata:
Your code should absolutely work, except that "=" should be "==". I'm a bit confused by the parse error message thought, was that all it said?
In any case, the code below works.
Code:
<?php
$password = 'THISisaTEST';
$userpass = MD5($password);
if ( $userpass == MD5($password ) ) { echo "HERE"; }
?>
If you have any other problems it may be that you're not getting $password back out of your text file correctly. You may want to have it display the string before it's stored and visually compare it to what you're getting back out of the text file.