Posted By

lmcdougall on 09/13/07


Tagged

mysql php textmate


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

basicmagic
vali29
heinz1959
esritter


Simple php mysql injection detect


 / Published in: Other
 

  1. unction 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. }
  9.  

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: heinz1959 on November 15, 2007

unction ? where's the F ?

Posted By: peteypablonz on November 21, 2007

mines better ;) http://snipplr.com/view/4165/clean-user-input-data--get-post-cookie-/

You need to login to post a comment.