This commit is contained in:
2024-10-11 15:25:45 +02:00
parent a59f40bc79
commit 0e0e141982
7 changed files with 262 additions and 0 deletions

11
crud/delete.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
require_once('connect.php');
if (isset($_GET['id']) && !empty($_GET['id'])) {
$id = strip_tags($_GET['id']);
$sql = "DELETE FROM `users` WHERE `id`=:id;";
$query = $db->prepare($sql);
$query->bindValue(':id', $id, PDO::PARAM_INT);
$query->execute();
header('Location: index.php');
}
require_once('close.php');