PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am making a "password reset" page and want the submitted data to run through php but don't want the page to redirect to the php page.
Here's the code so far. My script will check that the old password exists in the database and the two new ones match. Then it will replace the one in the database with the new one (md5 encrypted). I have all the code worked out as far as the actual processing but don't know any other way to get the form vars to the php without post. I don't want the browser to redirect though. I just want it to display the success or error message under the "change password" and "cancel" buttons.
I can't have the changeProfile.php redirect back to this page because it's a redirect loop.
OK Im getting confused as to what is html and what is java. Didn't try the onclick thing because a friend told me to just include another php page that puts all the html in variables and then echo it out on the current page. The problem is that it still acts as if I had only one page since all I'm doing is echoing.
So to rephrase the question,
I don't want my form page to change or redirect. I want it to stay on the form page but display a success message. But I have to post the form data to php somewhere to be able to process it.
Here's what I have so far and it is still redirecting of course because even in the variables being echoed there is a 'action="profileInc.php"'. Can anyone tell me the correct way to do this? Am I doing it backwards?
don't know why but I hadn't tried posting back to the form itself.
form action="../app/profile.php" solved the problem.
Only now every time I refresh the page firefox gives me the pop up saying it needs to resend information. IE6 doesn't give this popup. It just refreshes with no problem.