Posted By

Shpigford on 11/24/06


Tagged

safe sanitize make


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

luxuryluke
oso96_2000
politicalanimal
skywalker


make_safe


 / Published in: PHP
 

  1. function make_safe($variable) {
  2. $variable = htmlentities($variable, ENT_QUOTES);
  3. $variable = stripslashes($variable);
  4. }
  5. $variable = mysql_real_escape_string(trim($variable));
  6. $variable = strip_tags($variable);
  7. $variable = str_replace("
  8. ", "", $variable);
  9. return $variable;
  10. }

Report this snippet  

You need to login to post a comment.