I read the answer here Simple Post-Redirect-Get code example, in my code, this works only when I clicked/pressed the back button. This is the process of the code
- POST
- Validates and if passed insert the data to database
- Redirect them to the same page
Redirect::in($_SERVER['REQUEST_URI']) //I applied the accepted answer on the link here.
Problems are:
- F5/refresh =
confirm submit form
is appearing. - Forward button = Document expired.
How can I solve this problem? I am aware/search of PRG pattern but failed to fully understand it and tried the accepted answer on the link but I still have some problem.