How to avoid PHP_SELF exploits
{"Image DocumentName": "How to avoid PHP_SELF exploits", "Image ImageDescription": "by using the htmlentities() <form name= test action= <?php echo htmlentities( _SERVER[ PHP_SELF ]); ?> method= post > The result of entering malicious code in URL will result in the following output: <form name= test method= post action= form- action.php/ ><script>alert( xss )& lt;/script><foo > the script part is now sanitized . don t forget to convert every occurrence of  _SERVER[ PHP_SELF ] into htmlentities( _SERVER[ PHP_SELF ]) throughout your script.", "Image XResolution": "37", "Image YResolution": "37", "Image ResolutionUnit": "Pixels/Centimeter", "Image Software": "SlidePlayer", "Image YCbCrPositioning": "Centered"}