iowebsite/staff/save_tasks.php

9 lines
243 B
PHP
Raw Normal View History

2024-01-29 00:02:02 -05:00
<?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"]));
}
?>