WebRef.eu  - Internet Marketing and Online Business Resources  

Home / Site Map | Blog | TwitterTwitter | Contact

PHP Form Input Sanitisation - Remove Potentially Dangerous Code from a Form Input Field

The below code snippet will remove any potentially dangerous code, e.g. <script> from a form field by replacing it with a space:

//remove any dangerous code from ReviewDesc
$ReviewDesc = str_replace(array("<script>", "<SCRIPT>", "MIME", "Content-Type"), "", $ReviewDesc);

 




Low Prices UK Shopping

Compare Prices
at LowPrices.co.uk


Home / Site Map | TwitterTwitter | Contact

All Content ©2018 WebRef.eu