79474844

Date: 2025-02-28 08:03:05
Score: 0.5
Natty:
Report link

It's because, as specified in the docs, the $_POST variable holds only data sent

using application/x-www-form-urlencoded or multipart/form-data as the HTTP Content-Type in the request.

If you're sending JSON data you need to manually decode the body:

$body = json_decode(file_get_contents('php://input'), true);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Aayla Secura