When I fill out my form and hit submit, the form executes properly, but then it disappears from the page. My code opens an alert box thanking the user for their email when the form is submitted. If I go away from the page then come back, for instance by clicking the browser Back button, the alert displays again as if I had submitted the form. And if I try to refresh the page it asks if I want to resend the information. So I have two questions, 1) how do I make it so the form does not disappear but stays available on the page, ready to use, and 2)how can I clear the information from the submission?
Here's my code:
<?
// include the class
include("../FormHandler/class.FormHandler.php");
// create a new FormHandler object
$form =& new FormHandler();
I've tried the php header call and it doesn't seem to work at all. I put it in the save to database function, I tried it in the function that creates the email and neither works. To test I set the header function to take me to twitter so I knew the function was working. If I put the header function right at the top of my file, it takes me to twitter, so I know the code is right.