File "delete_blog.php"
Full Path: /home/alphpwcp/previewstream.online/admin/delete_blog.php
File size: 299 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
session_start();
require_once '../db.php'; // include PDO database connection
$id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
if ($id > 0) {
$stmt = $pdo->prepare("DELETE FROM blogs WHERE id = ?");
$stmt->execute([$id]);
}
header("Location: blog_list.php");
exit;
?>