php $_POST array empty upon form submission

When using JSON content-type the $_POST array will not populate (only with multi-part forms I believe)

Here is how I correct the issue:

$_POST = json_decode(file_get_contents("php://input"), true);

Leave a Comment