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

if(!empty($_POST['delete_ids'])){
    foreach($_POST['delete_ids'] as $id){
        $id = (int)$id;
        $log_conn->query("DELETE FROM search_logs WHERE id=$id");
    }
}

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