When it comes to passwords and encryption on secure sites, i'd recommend doing the following..
when the user first choose (or is given) a password, your script that stores the new user in the DB should encrypt the password like so:
$password = md5($password_from_form)
$query = mysql_query("INSERT INTO users (password) VALUES ('$password')");
then whenever you need to check their password, do it like so:
$password = md5($password_from_login_form)
$query = mysql_query("SELECT user FROM users WHERE password='$password');
Make sense? This way you are never decrypting the password in your script, and there's no risk of someone finding out what it is.
This is just a guide.. you'll need to play with it a bit.