note 88869 deleted from function.mysql-real-escape-string by aidan

From: Date: Sun, 24 May 2009 19:39:31 +0000
Subject: note 88869 deleted from function.mysql-real-escape-string by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155925@lists.php.net to get a copy of this message
Note Submitter: jeswanth at gmail ---- Hi all, Untill recently i have been using this mysql_real_escape function and other functions such as preg_match, preg_match_all to safeguard the dbase from injection attacks. Now I have found a very easier and more affective function of php if you you are going to accept ecnglish alpha numeric characters as input. The ctype_alnum tells you if the imput string is all alphanumeric. You can filter the input even before framing a query. Of course if you want to accept input in regular expression format we always have preg_match, preg_match_all etc. Hope this helps any one. Thank you.

« previous php.notes (#155925) next »