<?php
include("../../classes/manager.class.php");
$m = new Manager();

if (isset($_POST['batch_id']) && isset($_POST['ing_id'])) {
    $batch_id = $_POST['batch_id'];
    $ing_id = $_POST['ing_id'];

    // Call the method to delete the batch item from the database
    $result = BatchSetup::DeleteBatchItem($batch_id, $ing_id);

    if ($result) {
        echo 'success';
    } else {
        echo 'error';
    }
} else {
    echo 'error';
}
?>