summaryrefslogtreecommitdiff
path: root/src/controller/post.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/controller/post.php')
-rw-r--r--src/controller/post.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/controller/post.php b/src/controller/post.php
new file mode 100644
index 0000000..926a5ae
--- /dev/null
+++ b/src/controller/post.php
@@ -0,0 +1,17 @@
1<?php
2// src/controller/post.php
3
4declare(strict_types=1);
5
6if($_SERVER['REQUEST_METHOD'] === 'POST' && $_SESSION['admin'] === true)
7{
8 // requêtes AJAX
9 require '../src/controller/ajax.php';
10
11 // formulaires HTML
12 if(isset($_POST['from']) // page d'où vient la requête
13 && isset($_POST)) // données
14 {
15 echo "requête envoyée en validant un formulaire";
16 }
17}