note 88328 added to language.variables.external
| From: | chris at chriswere dot com | Date: | Tue, 20 Jan 2009 12:55:49 +0000 |
| Subject: | note 88328 added to language.variables.external | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149517@lists.php.net to get a copy of this message | ||
In addition to anonymous' list of characters that are replaced with an underscore.
If you use arrays in your variable names, the second and subsequent levels are not replaced. For
example:
<input name="a field name" />
<input name="data[first data]" />
<input name="data[second data]" />
will produce $_POST as follows:
array(
"a_field_name" => ...
data => array(
"first data" => ...
"second data" => ...
)
);
I expect this is the same with other characters, not just space, but haven't tested this.
Ideally if register globals is off, this replacement wouldn't occur as it isn't necessary
- but we have to deal with it.
----
Server IP: 208.69.120.35
Probable Submitter: 121.221.209.25
----
Manual Page -- http://www.php.net/manual/en/language.variables.external.php
Edit -- https://master.php.net/note/edit/88328
Del: integrated -- https://master.php.net/note/delete/88328/integrated
Del: useless -- https://master.php.net/note/delete/88328/useless
Del: bad code -- https://master.php.net/note/delete/88328/bad+code
Del: spam -- https://master.php.net/note/delete/88328/spam
Del: non-english -- https://master.php.net/note/delete/88328/non-english
Del: in docs -- https://master.php.net/note/delete/88328/in+docs
Del: other reasons-- https://master.php.net/note/delete/88328
Reject -- https://master.php.net/note/reject/88328
Search -- https://master.php.net/manage/user-notes.php