How to delete post request

I have a Formular and send the Input with a Submit-Button to a Controller-Function. Now i want impeded that the data save again when the user is reloading the site with the form.

Is there any way to delete the post request so that there are no datas anymore if the user reloading the site with STRG+F5 or the reload button in the browser?

I hope I was able to express myself clearly enough.


We usually use Post/Redirect/Get(PRG) design pattern to avoid this kind of problem.

And in fact Yii’s Gii CRUD generator follows this PRG design pattern to generate create, update and delete actions.

thank you very much for this information