note 94733 deleted from function.addslashes by danbrown

From: Date: Fri, 20 Nov 2009 21:11:44 +0000
Subject: note 94733 deleted from function.addslashes by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-163145@lists.php.net to get a copy of this message
Note Submitter: Boris Kster (X-ITEC) ---- function xi_helper_anti_injection(&$form) { if( is_array($form) ) { foreach ($form as &$val) is_array($val) ? xi_helper_anti_injection($val):$val=addslashes($val); } else { $form=addslashes($form); } ----- Test: $sql1="ich bin's"; xi_helper_anti_injection($sql1); echo $sql1; $arr[]="Normalfeld"; $arr[]="Das' isses'or'if'"; xi_helper_anti_injection($arr); print_r($arr);

« previous php.notes (#163145) next »