To avoid re-submits I add a random-number $rand to the form by "GET".
Further, the $rand is stored in a SESSION-variable.
Everytime the file ist called, the functions will only be processed if the $rand that comes by "GET" is not identical to the $rand in the SESSION-variable.
If someone comes there by pressing the "back" key of his browser, the 2 $rand will be identical and nothing will happen.
That works perfect.