From cf270f3726a8037ebef80888eb510172688e13a7 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 30 Apr 2021 09:35:40 +0300 Subject: CRUD bugs --- bug/delete.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'bug/delete.php') diff --git a/bug/delete.php b/bug/delete.php index e69de29..9054151 100644 --- a/bug/delete.php +++ b/bug/delete.php @@ -0,0 +1,28 @@ +prepare("DELETE FROM bugs WHERE id=:bug_id"); +$query->bindParam(':bug_id', $_GET['id']); +if($query->execute()) { + echo "

bug deleted

"; +} else { + echo "

bug failed to delete

"; +} + +redirect: header("Refresh: 2; URL=$_SERVER[HTTP_REFERER]"); +footer: require_once(TEMPLATES_PATH . "/footer.php"); +?> -- cgit v1.2.1