Hi there,
Working on the PHP DB I took over I have just come across a problem. When
the user presses refresh in some circumstances the command they just
performed will be re-performed. In some cases this is very undesirable.
Further example:
There is a PHP page in my web application that has a text box and the
ability to add a note to the account the user is currently viewing. When the
user presses submit the page reposts to itself with a hidden command
parameter so the form knows what to do before redisplaying the account
details (with the new note).
However if the user presses refresh, the command gets re-executed again and
we now have another identical note added to the account.
Not desirable behaviour particularly when it comes to editing / deleting
items etc.
Bearing in mind this is a large application that will have many pages to
change and a Monday deadline for new changes, what is an easy way I can
prevent this? How do other people cope with this? Maybe from the start the
whole thing should have been approached differently but I have to work with
what I have.
Any suggestions?