PHP 5.4.17
I have a simple html form that looks something like this:
index.html
<form method="POST" action="/addnewaccount.php">
<input type="text" name="firstname" />
<button type="submit">Submit</button>
</form>
addnewaccount.php
<?php
var_dump($_POST); // array(0) {}
var_dump($_REQUEST); // array(0) {}
var_dump(file_get_contents('php://input')); //string(0) ""
var_dump($HTTP_RAW_POST_DATA); // NULL
When this form gets submitted, php will not populate the $_POST or $_REQUEST variables. They are just empty arrays.
I have checked the following in my php.ini file:
enable_post_data_reading = On
post_max_size = 10M
variables_order = "GPCS"
request_order = "GP"
If I change the form's enctype to "multipart/form-data", the $_POST and $_REQUEST variables are populated, so I feel that the issue is with the default enctype of "x-www-form-urlencoded", but I can't figure out how to get things to work with the default.