Sorry to be thick, just I need to get this right...
Based on what script you posted, I would store the $password variable in database - which would be encrypted.
The $user_input would then be the users attempted login password.
So how would I go about decrypting the password from it's encrypted state in the database to it's original form so it can be displayed on the screen?
Once again, sorry for being thick!