문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top