<?php
include 'includes/connect.php';

if(isset($_POST['id'])){
    $id = intval($_POST['id']);
    $delete_query = "DELETE FROM brand WHERE id = $id";
    if(mysqli_query($conn, $delete_query)){
        echo "Brand deleted successfully";
    } else {
        echo "Error deleting brand";
    }
} else {
    echo "Invalid request";
}
?>