From ed0594f8f73c6eee8c6eca6ecf6208952ea26cdc Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sat, 13 May 2023 15:36:20 +0200 Subject: add products working (no image upload working yet) --- public/admin-product.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) (limited to 'public/admin-product.php') diff --git a/public/admin-product.php b/public/admin-product.php index d65fc9e..a760ebe 100644 --- a/public/admin-product.php +++ b/public/admin-product.php @@ -1,14 +1,60 @@ + +query("select max(id)+1 as id from webs.product"); +$obj = $res->fetch_object(); +$new_id = $obj->id; +?> +prepare("insert into webs.product (`name`, `description`, `price`, `category`, `image`) values (?, ?, ?, ?, ?)"); + $statement->bind_param("ssdii", $name, $description, $price, $category, $image); + $statement->execute(); +} while (false); +?> - super secret admin page + product toevoegen +
-

admin

+

product toevoegen

+
+ + + + + + + + + + + + + +
-- cgit v1.2.3