Apr 27, 2006
I've searched for solutions on how prevent a browser refresh from posting a repeat process, and a suggestion of redirecting the page to a "dummy" page which then flips back to the main page seems like something I can handle. My problem is, I'm not quite clear on the journey. Here's what I understand:
View 6 Replies
Page loads, waits for user input. User fills out form and hits "submit". Page inits, with $_POST variable populated with form data (I have a db_start() up top). HP code is processed, at which point I take care of form data.
here is where I'm not sure how the redirect should happen. I'm thinking efore page is released to browser, I redirect the page to the "dummy" page with something like this:
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/');
$extra = 'dummy.php'
Finally, the dummy page has a single header command to reload, sans $_POST variable, the main page.