PHP 8.4.24 Released!

Voting

: max(zero, two)?
(Example: nine)

The Note You're Voting On

php (at) vxvr /dot de
5 years ago
If you want to receive application/json post data in your script you can not use $_POST. $_POST does only handle form data.
Read from php://input instead. You can use fopen or file_get_contents.

Example:

<?php
// Get the JSON contents
$json = file_get_contents('php://input');

// decode the json data
$data = json_decode($json);
 ?>

<< Back to user notes page

To Top