8 lines
243 B
PHP
8 lines
243 B
PHP
<?php
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
$data = json_decode(file_get_contents("php://input"), true);
|
|
|
|
// Store tasks in a flat-file database (tasks.txt)
|
|
file_put_contents("tasks.txt", implode("\n", $data["tasks"]));
|
|
}
|
|
?>
|