This commit is contained in:
2024-07-13 17:59:54 +02:00
parent 4d25387a47
commit 03da043be3
9 changed files with 106 additions and 6 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
$method = $_SERVER['REQUEST_METHOD'];
switch ($method) {
case "GET":
return get();
default:
return Response::api("$method not supported", 500);
}
function get()
{
$db = Database::getInstance();
$query =
"SELECT
*
FROM
egb_gaestebuch";
$stmt = $db->prepare($query);
$stmt->execute();
Response::api($stmt->fetchAll());
}