Pregunta

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?

¿Fue útil?

Solución

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.

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top