I've got a better idea: ditch the md5 function altogether and usecrypt.
An example:
<?php
$password = "somepassword";
$passwordThatSomeoneEntered = "somepassword";
$password = crypt($password);
if(crypt($passwordThatSomeoneEntered, $password) == $password)
{
// do something if the passwords match
}
else
{
// do something if the passwords don't match
};
?>
And here's another function that I found on the PHP.net comments board (apparently it's simple but effective as long as the password stays hidden):
<?php
?>
Sorry, I can't find it just now (it was there yesterday!)