note 47494 added to reserved.variables

From: Date: Thu, 18 Nov 2004 03:57:37 +0000
Subject: note 47494 added to reserved.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-80683@lists.php.net to get a copy of this message
I encountered a gotcha in $_POST variables that come back from text fields. It appears that single quotes (') in text areas when posted are placed in the $_POST variable escaped by a backslash character (\). Not sure if this is being done by the browser, the HTTP server, or PHP itself, but, it means that if you compare what you got back to what you sent out, it won't always be equal, even if the only difference is the backslash(es) added by this process. I have not yet found a place where this replacement is documented, so , I cannot unfortunately document what else gets substituted or propose correct code to parse these returned strings. ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47494 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47494&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47494&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47494&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47494&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47494&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47494&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47494&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80683) next »