Posted By

johnpaulhayes on 02/14/11


Tagged

input tags remove cleaning


Versions (?)

Remove tags from user input


 / Published in: PHP
 

  1. // Sanitize the input
  2. $ar= array(&$_REQUEST,&$_POST,&$_GET);
  3. foreach ($ar as &$input) {
  4. foreach($input as $key=>&$value) {
  5. $value=strip_tags(trim($value));
  6. }
  7. }

Report this snippet  

You need to login to post a comment.