EDIT: I used var_dump($_POST) OUTSIDE of the if statement.
I've tried multiple solutions and none have worked, so this is my last attempt at resolving this issue. I have a form written in HTML sending data to a PHP script via POST, and the PHP script for whatever reason is only reading $_POST as empty.
Here is my PHP code:
if (isset($_POST['login'])) {
die('test');
}
Here is my HTML form:
<form action="api/login.php" method="post">
<input type="text" name="login-email" placeholder="Email">
<input type="password" name="login-password" placeholder="Password">
<input type="checkbox" name="login-remember-me" checked>
<button name="login" type="submit">Login</button>
</form>
var_dump($_POST); returns:
array(0) { }
file_get_contents('php://input'); returns:
login-email=user%40email.com&login-password=123123&login-remember-me=on&login=
Like I said, I have tried every solution I've come across after Googling this issue dozens of times. I am using PHP 5.5.32 NTS on Windows 10 Enterprise x64 with IntelliJ IDEA 15.0.4.
EDIT: Doing var_dump($GLOBALS), my input stayed within ["HTTP_RAW_POST_DATA"], didn't end up anywhere else. I have also tried using PHP 5.6.19 NTS instead of 5.5.32, which still did not fix this issue.
$GLOBALSlike so:var_dump($GLOBALS);to see where your input ended up.api/login.phpbut a file with the same name in a different location...? try changing some text on the file you're editing now (and think is the right one), and see if it actually displays...post_max_sizevalue and ensure it is set to a valid value? i.e.8Mvs8MB