I think what you need to do is to md5 the password with php and just store it in the field. This way you will have a simple comparison of two values.
So if you have a text box which is of type password (displays little stars) you grab that value and you do:
$encrypted = md5($pass);
and then
SELECT id from user WHERE username = '$user' AND password = '$encrypted';
This should do what you want. Alternatively if I am totally wrong on understanding what you need (no big surprise there
) please let us know what you were thinking with a bit more detail.