From e5e3cdb4da3b5c0f4298f84e80de5182b1f632c0 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sat, 13 May 2023 16:14:31 +0200 Subject: admin category dinges klaar --- public/admin-category.php | 33 ++++++++++++++++++++++++++++++++- public/admin-product.php | 9 ++++----- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/public/admin-category.php b/public/admin-category.php index a899b00..b55e084 100644 --- a/public/admin-category.php +++ b/public/admin-category.php @@ -1,16 +1,47 @@ +query("select max(id)+1 as id from webs.category"); +$obj = $res->fetch_object(); +$new_id = $obj->id; +?> +prepare("insert into webs.category (`name`, `parent`) values (?, ?)"); + $statement->bind_param("si", $name, $parent); + $statement->execute(); +} while (false); ?> categorie toevoegen +

categorie toevoegen

- +
+ + + + + + + +
diff --git a/public/admin-product.php b/public/admin-product.php index 9431cb2..8e04e30 100644 --- a/public/admin-product.php +++ b/public/admin-product.php @@ -6,8 +6,7 @@ $res = $cursor->query("select max(id)+1 as id from webs.product"); $obj = $res->fetch_object(); $new_id = $obj->id; ?> - +} while (false); ?> @@ -45,6 +43,7 @@ do {

product toevoegen

+

Categorie toevoegen

@@ -53,7 +52,7 @@ do { - query("select id, name from webs.category"); while ($c = $res->fetch_object()) echo ""; -- cgit v1.2.3