Use md5() or crypt().
Remember this are one-way encryption functions, you can not (trivally) decrypt them. To use them, you store the encrypted text in your db...then when you want to authenticate, just encrypt the password given and compare to the one in the db.