i usually use md5() for encrypting. and the logic will work for crypt as well.
your not going to decrypt at all, but rather encrypt the password they enter, and compare it to the encrypted password stored in the database.
when you use md5() , it produces a 32 character string, and that is the string you would store in the database.
PHP Code:
<?
// lets say you had a form that passed username and password
$encrypted_password = md5($_POST['password']);
$result=mysql_query("select * from users
where username='" . $_POST['username'] . "'
and password='" . $encrypted_password . "'");
// if any rows were found then it was successful
?>