Im trying to accomplish two things, ones a form that a user can fill out that changes the users password and two, a form that will retrieve a password from the database if two id criteria are met (both of which are contained in the database). The forms are not the problem but the scripts that talk to the database for both these issues elude me.
The database is postgreSQL
Problem one
Im willing to start from scratch here. I need a change password script that will check a users username and password (via variables entered from a form) and then replace the old password with the new password specified in said form. All elements to be checked are contained within the database table to be updated. In addition I need it to return whether it was successfull or not. Ive developted a script that will update the database, but it wont return the proper error line if inaccurate user information is submitted.
Problem two
I also need a script that will retrieve a password from the database if identification criteria are met (in this case, a username and a social security number) and then display that password for the user to see.
Does anybody have a simple script that can accomplish this by pluging in my particular variables and database info?
Thank you VERY much for any assistance
NOTES:
Security is not a large issue