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

From: Date: Sat, 01 Jan 2005 14:18:33 +0000
Subject: note 48604 added to function.mysql-real-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-82535@lists.php.net to get a copy of this message
A case where you do not need to escape is when you are about to compare the UI (User Input) with a database through MD5 hashes, infact if you do, the password stored in the database will not match the one in the request. I had a living hell trying to solve this in my earlier days, so I just wanted to enligthen any other newbies, <?php $try_pass=md5($_POST['u_pass']); ?> is sufficient escaping. Cheers ---- Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48604 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48604&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48604&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48604&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48604&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48604&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48604&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48604&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82535) next »