Anti-SQL Injection Function


SUBMITTED BY: Guest

DATE: Jan. 15, 2014, 9:49 p.m.

FORMAT: Text only

SIZE: 225 Bytes

HITS: 775

  1. function cleanuserinput($dirty){
  2. if (get_magic_quotes_gpc()) {
  3. $clean = mysql_real_escape_string(stripslashes($dirty));
  4. }else{
  5. $clean = mysql_real_escape_string($dirty);
  6. }
  7. return $clean;
  8. }

comments powered by Disqus