<?php
session_start();
include __DIR__ . '/../database/search_log_config.php';

if(isset($_GET['id'])){
    $id = (int)$_GET['id'];

    $stmt = $log_conn->prepare("DELETE FROM search_logs WHERE id=?");
    $stmt->bind_param("i", $id);
    $stmt->execute();
    $stmt->close();
}

header("Location: view_search_logs.php");
exit;
?>