I have a MySQL db called "userinfo" which contains usernames and two password fields, one for them to log in to their MySQL account and another will be returned after they log in. In the login page I am using, I want it to pull the username and password, send it to a script which will login to MySQL and return the other password, and I want to replace the old password with the new password in the INPUT box. The only examples I've found online that are even close to this require that I open a php file, but I don't see why I can't include the very same code in my login page.
Any help?