2024-01-29 00:02:02 -05:00
|
|
|
<?php
|
|
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
|
|
$data = json_decode(file_get_contents("php://input"), true);
|
2024-01-29 07:36:56 -05:00
|
|
|
var_dump($data);
|
2024-01-29 00:02:02 -05:00
|
|
|
// Store tasks in a flat-file database (tasks.txt)
|
2024-01-29 07:36:56 -05:00
|
|
|
$ret = file_put_contents("tasks.json", json_encode($data["tasks"], JSON_PRETTY_PRINT));
|
|
|
|
var_dump($ret);
|
2024-01-29 00:02:02 -05:00
|
|
|
}
|
|
|
|
?>
|