From c955912c2bcc672ac23785ffe2059a9a62b8219b Mon Sep 17 00:00:00 2001
From: Joshua Perry <45966243+jpez-development@users.noreply.github.com>
Date: Sat, 19 Nov 2022 15:43:06 +0000
Subject: [PATCH] deleteCategory page completed
---
public/admin/addCategory.php | 3 ++-
public/admin/deleteCategory.php | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/public/admin/addCategory.php b/public/admin/addCategory.php
index c0d7093..fc28488 100644
--- a/public/admin/addCategory.php
+++ b/public/admin/addCategory.php
@@ -24,4 +24,5 @@ if (isset($_POST['submit'])) {
];
$stmt->execute($values);
echo '';
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
diff --git a/public/admin/deleteCategory.php b/public/admin/deleteCategory.php
index e69de29..3e47ade 100644
--- a/public/admin/deleteCategory.php
+++ b/public/admin/deleteCategory.php
@@ -0,0 +1,24 @@
+prepare('DELETE FROM category WHERE category_id= :category_id');
+ $values = [
+ 'category_id' => $_GET['category_id']
+ ];
+ $stmt->execute($values);
+ echo '';
+}
+else {
+ echo '';
+}
+?>
\ No newline at end of file