Basicaly the title say's it all. i had an hidden input on my page where i wanted to set the name to "some.major.uber.setting"
for example: <input type="hidden" name="some.major.uber.setting" value="dummy value" />
and when i looked at the $_POST data it contained "some_major_uber_setting". Can anybody explain this behaviour
$_POST is a predefined variable which is an associative array of key-value pairs passed to a URL by HTTP POST method that uses URLEncoded or multipart/form-data content-type in request. $HTTP_POST_VARS also contains the same information, but is not a superglobal, and now been deprecated.
In my case, when posting from HTTP to HTTPS, the $_POST comes empty. The problem was, that the form had an action like this //example.com When I fixed the URL to https://example.com , the problem disappeared. I think is something related on how the server is setup. I am having the same issues using GoDaddy as a host.
' (dot) operator is PHP's concatenation operator. Two string operands are joined together (characters of right hand string appended to left hand string) and returns a new string.
$_POST is a superglobal whereas $POST appears to be somebody forgetting the underscore. It could also be a standard variable but more than likely it's a mistake.
That is probably a relict from register_global = On
times. $_GET
/$_POST
variables were turned into standard variables ($_GET['foo']
became $foo
). Variable names can't contain dots so they were internally converted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With