Page 1 of 1

Refresh causing unwanted HTML Form processing in PHP

Posted: Wed Jul 17, 2002 9:28 pm
by Steve Lawson
Is there a way to tell (using pure PHP -- or, perhaps even, JavaScript with PHP)) the difference between a page that was loaded (reloaded) by the Browsers 'Refresh' button and that was loaded from a Submit button on a different page (or even on the same page)? I'm having a problem with the 'get' data in the URL being applied again when the Refresh button is pressed.
Would this be a job for Session handling functions (which I just discovered but don't quite know how to use)?

Posted: Thu Jul 18, 2002 12:26 am
by ssand
I ran into the same problem a couple days ago.

My form was short, so I eventually ended up dumping all my PHP to process the form on a separate page and then depending on the result sent the user to the correct page.

or Have you tried using unset()??
I doubt it will clear the data in the URL on refresh, but it's worth a try.