note 97865 rejected from language.variables.external by danbrown
| From: | danbrown@php.net | Date: | Wed, 12 May 2010 19:22:44 +0000 |
| Subject: | note 97865 rejected from language.variables.external by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169194@lists.php.net to get a copy of this message | ||
Note Submitter: davidrobinson91 at hotmail dot com
----
<?php
var_dump($_POST);
?>
<form action="" method="POST">
<input type="text" name="user.name" value="" />
<input type="submit" name="save" />
</form>
the var_dump($_POST) will give you the result
array(2) { ["user_name"]=> string(3) "abc" ["save"]=>
string(32) "submit" }
instead of
array(2) { ["user.name"]=> string(3) "abc" ["save"]=>
string(32) "submit" }
There could be a string replacement before the array assignment.
If we change name="user.name" to name="user..name",
the $_POST will give you the result
array(2) { ["user__name"]=> string(3) "abc" ["save"]=>
string(32) "submit" }
As a conclusion, any '.' (dot) in the name attribute will be transformed to "_"
(underscore) after the assignment to the $_POST.
Any clues?