yo don't decrypt passwords
its a one way trip
encrypt the users password,using what ever mode you choose to use (could use a front end function or an internal MySQL encryption function
when you request a password repeat the encryption process and compare the encrypted values. providing you use the same method to encrypt then there is no problems
storing passwords in a db in clear is a bad move
(virtually) all sample code I post will almost certainly contain typos, some logic errors and will need debugging. its air code, providing with good intentions but no guarantees it works or is fit for purpose. in essence yer gets what yer pays for...
PS I'd rather be riding on the Tiger 800 or the Norton