Does anyone know of a way to prevent the browser from asking the user to resend form information.
I know you can redirect the browser with:
<php header('location http://example.com'); ?>
But this seems so inefficient and takes 2 request.
Hope you can help.
duplicate of: How do I stop the Back and Refresh buttons from resubmitting my form?
Either redirect like your example, or use AJAX to submit the form in the first place. The browser has no way of requesting the same page without requesting the same page.
Not re-submitting the data would be the same as requesting a different page, so you’re kinda stuck.