Added a simple TODO list manager

This commit is contained in:
Lutchy Horace 2024-01-29 00:02:02 -05:00
parent a805638920
commit 54093e75e0
4 changed files with 153 additions and 2 deletions

8
staff/save_tasks.php Normal file
View file

@ -0,0 +1,8 @@
<?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"]));
}
?>