Téléverser les fichiers vers "Admin"

This commit is contained in:
2025-11-02 20:29:07 +00:00
commit 3d71aa8d20
5 changed files with 219 additions and 0 deletions

18
Admin/supprimer.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
session_start();
require '../includes/db.php';
if (!isset($_SESSION['admin'])) {
header('Location: connexion.php');
exit;
}
$id = $_GET['id'] ?? null;
if ($id) {
$stmt = $pdo->prepare("DELETE FROM articles WHERE id = ?");
$stmt->execute([$id]);
}
header('Location: tabledebord.php');
exit;
?>