12 lines
220 B
PHP
12 lines
220 B
PHP
<?php
|
|
require_once 'db/config.php';
|
|
|
|
if (isset($_GET['id'])) {
|
|
$id = $_GET['id'];
|
|
$stmt = db()->prepare('DELETE FROM contacts WHERE id = ?');
|
|
$stmt->execute([$id]);
|
|
}
|
|
|
|
header('Location: contacts.php');
|
|
exit;
|