From 935d48f6f7412b66ed57820be8a5421b5e878d85 Mon Sep 17 00:00:00 2001 From: /jedi/ Date: Sun, 30 Dec 2018 13:26:45 +0100 Subject: [PATCH] add ajax to found form --- ajax.php | 2 +- templates/{insert.php => found.php} | 36 +++++++++++++++++++++++++++-- templates/sidebar.php | 2 +- 3 files changed, 36 insertions(+), 4 deletions(-) rename templates/{insert.php => found.php} (57%) diff --git a/ajax.php b/ajax.php index 5e53d56..817f837 100644 --- a/ajax.php +++ b/ajax.php @@ -29,7 +29,7 @@ switch($_GET["action"]) { $errormsg = "all values have to be set"; } break; - case "insert": + case "add_found": if (hasval($_POST["was"]) && hasval($_POST["wann"]) && hasval($_POST["wo"])) { /* Prepared statement, stage 1: prepare */ if (!($stmt = $mysqli->prepare("INSERT INTO items(was, wann, wo) VALUES (?, ?, ?)"))) { diff --git a/templates/insert.php b/templates/found.php similarity index 57% rename from templates/insert.php rename to templates/found.php index 1a22154..8dc99bb 100644 --- a/templates/insert.php +++ b/templates/found.php @@ -19,6 +19,15 @@ + + + + +
@@ -26,11 +35,11 @@ Insert Item into DB
-
+

">

-

+

@@ -40,6 +49,29 @@ + + + diff --git a/templates/sidebar.php b/templates/sidebar.php index 4e9dc1a..2dc28b0 100644 --- a/templates/sidebar.php +++ b/templates/sidebar.php @@ -21,7 +21,7 @@