frshjb373 Posted September 11, 2012 Share Posted September 11, 2012 Not sure if this is the best place to be posting this topic so please let me know if this can better addressed somewhere else. Anyways, I have a form, that upon submission creates a return shipping label automatically. To avoid users going back and attempting to resubmit the form (which will thereby run the script to create another shipping label), I'd like to figure out a way to completely expire that form page...or redirect the user to another page if going back. Any advice or resources would be much appreciated. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/268244-expire-form-after-submitted-if-user-attempts-to-go-back/ Share on other sites More sharing options...
scootstah Posted September 11, 2012 Share Posted September 11, 2012 This is typically done be sending a token along with the form. You can save the token to a session or temporary cookie when a form is submitted. Generate a new token on a legitimate form refresh. If the token matches one that was already set, it is a duplicate request. Quote Link to comment https://forums.phpfreaks.com/topic/268244-expire-form-after-submitted-if-user-attempts-to-go-back/#findComment-1376886 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.