#20116 [NEW]: $_POST keys starting with "+"
| From: | dan at wavefront dot ca | Date: | Sun, 27 Oct 2002 07:17:24 +0000 |
| Subject: | #20116 [NEW]: $_POST keys starting with "+" | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-23411@lists.php.net to get a copy of this message | ||
From: dan@wavefront.ca
Operating system: OS X 10.2.1
PHP version: 4.2.3
PHP Bug Type: Variables related
Bug description: $_POST keys starting with "+"
I have a simple method of creating easy form processing....
I thought....
I came up with the idea (I am not claiming to be the first)
to have form elements I want to update via MySQL starting
with either "-" or "+".
Example:
+name=DAN
+email=dan@wavefront.ca
-notes=
id=1
The first 2 are required and will be updated, the 3rd is
optional and will be updated and the 4th (id) is simply
passed as form data.
The idea here is that I parse the $_POST variable to auto
create a "UPDATE table SET name = 'Dan', email =
'dan@wavefront.ca' WHERE = 1" string for MySQL.
The issue is that if I use the "+" to indicate a required
field for error trapping my $_POST array ends up like this:
+namD=AN
+emaild=an@wavefront.ca
-notes=
id=1
If a change to any other character (* for example) it work
fine.
Either this is a PHP / HTTP bug or I am up against some
strange post naming restriction. I searched the web, the
PHP site (includeing the bugs) and could not spot an
obvious reference.
Dan
--
Edit bug report at http://bugs.php.net/?id=20116&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20116&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20116&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20116&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20116&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20116&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20116&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20116&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20116&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20116&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20116&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20116&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20116&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20116&r=isapi