diff --git a/.htaccess b/.htaccess index 212803a..6d974a4 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,5 @@ RewriteEngine On RewriteCond %{REQUEST_METHOD} ^DELETE$ RewriteRule ^([0-9]+)$ delete.php?id=$1 +RewriteCond %{REQUEST_METHOD} ^POST$ +RewriteRule ^$ post.php diff --git a/post.php b/post.php new file mode 100644 index 0000000..425b649 --- /dev/null +++ b/post.php @@ -0,0 +1,12 @@ +name, $body->age); + + $people[] = $zagthar; + + echo json_encode($people); +?>