Is it a good practice to redirect after a form has been submitted?

php, redirect

Solution

This is standard practice called `redirect after post` or Post/Redirect/Get. It's considered best practice when dealing with post forms

Problem

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?

Original source