This is an old issue and I have consulted many questions on SO before posting this
How to prevent form resubmission when page is refreshed via PHP
Post/Redirect/Get on same page with firefox
and many other.
I have a small app and the structure is like this
index.php (acting as controller)
viewsfolder(contains HTML)
models(contain DB insertion etc)
When user lands on index.php
I show him required view suppose
require_once(views/signin.php)
User submits the form on index.php
, like from signin.php
it posts data to index.php?signin=true
. I call the required function from models and make a redirect to itself.
to avoid form re-submission.
Apparently in chrome and in Firefox I still am able resubmit form and also click on BACK button of browser to go to previous page. which destroys the whole business logic.
I assume that redirection should help here but it is n't I know I can use AJAX to avoid all of that, but cant i do this without AJAX. I don't think every MVC based CMS is using AJAX on backend.
Is something wrong with me architecture ?