diff --git a/24_todolist_php/delete_task.php b/24_todolist_php/delete_task.php
new file mode 100644
index 0000000..7622d57
--- /dev/null
+++ b/24_todolist_php/delete_task.php
@@ -0,0 +1,25 @@
+prepare("DELETE FROM tasks WHERE id = :id");
+ $query->execute(["id" => $task_id]);
+ header("Location: /?status=deleted");
+ exit;
+ } catch (PDOException $e) {
+ //echo($e->getMessage());
+ header("Location: /?status=db_error");
+ exit;
+ }
+ } else{
+ header("Location: /?status=invalid_id");
+ exit;
+ }
+} else {
+ header("Location: /");
+ exit;
+}
\ No newline at end of file
diff --git a/24_todolist_php/footer.php b/24_todolist_php/footer.php
index 2d609a1..8b51fcc 100644
--- a/24_todolist_php/footer.php
+++ b/24_todolist_php/footer.php
@@ -1,9 +1,12 @@
-
+