note 88869 added to function.mysql-real-escape-string

From: Date: Wed, 11 Feb 2009 18:15:08 +0000
Subject: note 88869 added to function.mysql-real-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-150502@lists.php.net to get a copy of this message
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. ---- Server IP: 203.199.69.133 Probable Submitter: 59.93.118.23 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php Edit -- https://master.php.net/note/edit/88869 Del: integrated -- https://master.php.net/note/delete/88869/integrated Del: useless -- https://master.php.net/note/delete/88869/useless Del: bad code -- https://master.php.net/note/delete/88869/bad+code Del: spam -- https://master.php.net/note/delete/88869/spam Del: non-english -- https://master.php.net/note/delete/88869/non-english Del: in docs -- https://master.php.net/note/delete/88869/in+docs Del: other reasons-- https://master.php.net/note/delete/88869 Reject -- https://master.php.net/note/reject/88869 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#150502) next »