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

From: Date: Thu, 28 Jul 2011 17:58:42 +0000
Subject: note 105119 added to function.mysql-real-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-181962@lists.php.net to get a copy of this message
Would it be enough to do something like this to prevent the sql injection? $name = md5($POST['name']); $pwd = md5($POST['pwd']); "select * from users where MD5(name) = '$name' AND pwd ='$pwd' " Note: pwd is stored in DB as the md5 of the original password. ---- Server IP: 69.147.83.197 Probable Submitter: 83.57.92.208 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php Edit -- https://master.php.net/note/edit/105119 Del: integrated -- https://master.php.net/note/delete/105119/integrated Del: useless -- https://master.php.net/note/delete/105119/useless Del: bad code -- https://master.php.net/note/delete/105119/bad+code Del: spam -- https://master.php.net/note/delete/105119/spam Del: non-english -- https://master.php.net/note/delete/105119/non-english Del: in docs -- https://master.php.net/note/delete/105119/in+docs Del: other reasons-- https://master.php.net/note/delete/105119 Reject -- https://master.php.net/note/reject/105119 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181962) next »