WebRef.eu  - Internet Marketing and Online Business Resources  

Home / Site Map | 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 | Contact

All Content ©2020 WebRef.eu