note 97870 added to language.variables.external

From: Date: Thu, 13 May 2010 05:40:26 +0000
Subject: note 97870 added to language.variables.external
Groups: php.notes 
Request: Send a blank email to php-notes+get-169201@lists.php.net to get a copy of this message
<?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. ---- Server IP: 59.188.18.107 Probable Submitter: 221.126.93.173 ---- Manual Page -- http://www.php.net/manual/en/language.variables.external.php Edit -- https://master.php.net/note/edit/97870 Del: integrated -- https://master.php.net/note/delete/97870/integrated Del: useless -- https://master.php.net/note/delete/97870/useless Del: bad code -- https://master.php.net/note/delete/97870/bad+code Del: spam -- https://master.php.net/note/delete/97870/spam Del: non-english -- https://master.php.net/note/delete/97870/non-english Del: in docs -- https://master.php.net/note/delete/97870/in+docs Del: other reasons-- https://master.php.net/note/delete/97870 Reject -- https://master.php.net/note/reject/97870 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#169201) next »