summaryrefslogtreecommitdiff
path: root/src/post-ajax.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-06-16 02:49:38 +0200
committerpolo <ordipolo@gmx.fr>2025-06-16 02:49:38 +0200
commitebf9c2050339da7a42dd67f09b98af1e92f833a3 (patch)
tree12f7ed11226300a47d7ab98e377aad8d4456f095 /src/post-ajax.php
parentba4c1d898fbcaa118ab6ff81317ef32839293d66 (diff)
downloadfullcalendar-ebf9c2050339da7a42dd67f09b98af1e92f833a3.zip
front-end plus ou moins terminé
Diffstat (limited to 'src/post-ajax.php')
-rw-r--r--src/post-ajax.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/post-ajax.php b/src/post-ajax.php
new file mode 100644
index 0000000..df5a01a
--- /dev/null
+++ b/src/post-ajax.php
@@ -0,0 +1,12 @@
1<?php
2if($_SERVER['REQUEST_METHOD'] === 'POST'){ // && $_SESSION['admin'] === true
3 if($_SERVER['CONTENT_TYPE'] === 'application/json'){
4 $data = file_get_contents('php://input');
5 $json = json_decode($data, true);
6 //var_dump($json);
7
8 $id = isset($json['id']) ? $json['id'] : 7; // = id_event en BDD si nouvel évènement
9 echo json_encode(['success' => true, 'id' => $id]);
10 die;
11 }
12} \ No newline at end of file