Jump to content

Form -> Back Pages!


poolhustler86

Recommended Posts

After submitting a form via php, and i redirect the user to another page.. that works fine. however once the user clicks on the back button they get the warning page by the browser about form data has been already submitted... how can i avoid all together the user getting a page like that?

Link to comment
Share on other sites

How are you redirecting?  If you redirect as soon as you process the request using header('Location: ...') then they should not get the warning from going back.  If you're using a meta tag or Javascript then you will keep getting it.

Link to comment
Share on other sites

the form submits, processes on the same page and then redirects the user from header: location function...

 

basically if the user clicks back, i dont mind if they see the previous page.. just dont want those warning messages, page expired messages... so when they do click refresh it resubmits the data again.

Link to comment
Share on other sites

Something is funny then.  I show, validate, and process my forms all in one script and part of my processing is to redirect with a call to header().  I have zero problems with duplicate submissions.

 

Is it possible the page that generates the form is itself the result of a post operation?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.