In order to compare the entered password with the one in the db you will need to encrypt the value that the user enters before you compare it. This should be similar to how your login works.
So whatever function is used to encrypt the value before it is stored in the db initially you should use with the user entered value, then compare that with the value from the db. If the two hashes match then the password is the same.