Frage

I have a reponse url "reponse.php" is which after a trasaction is done,the banks response is posted to it and inturn display the status to the user whether trasaction is succesfull or not.But the problem is,when user lands in this,the back button is active and user can click on it and go back.I do want to disable this back button.Any ideas?

War es hilfreich?

Lösung

The selected solution is wrong. This is not how to solve this problem. $_SERVER['HTTP_REFERER'] is not reliable. It can be spoofed and omitted which breaks this solution.

To prevent this you need to implement the POST/REDIRECT/GET pattern. Here is a tutorial that shows how it is done in PHP.

Andere Tipps

Check for $_SERVER['HTTP_REFERER']. It will return you the document refered URL. With that URL you can give the condition and disable the button.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top