I’ve recently taken to doing a header() redirect (to the same page) after certain forms on my website have been submitted (mostly related to a shopping cart application) so that the user doesn’t do unintended things by refreshing the page or by going “back” or “forward” and refreshing the page. Is this an acceptable practice?
I’ve recently taken to doing a header() redirect (to the same page) after certain
Share
This is standard practice called
redirect after postor Post/Redirect/Get. It’s considered best practice when dealing with post forms