Remove tags from user input


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.