Posted By

michielcox on 07/06/13


Tagged


Versions (?)

Function: Clean string for DB entry


 / Published in: PHP
 

  1. function clean_for_db($data) {
  2. $entry = trim($data);
  3. $entry = strip_tags($entry);
  4. $entry = mysql_real_escape_string($entry);
  5. return $entry;
  6. }

Report this snippet  

You need to login to post a comment.