<?php
include 'conn.php';
//Select data from database

include 'funciones.php';

session_start();
$_SESSION['database'] = $_POST['database'];
$_SESSION['op_id'] = $_POST['op_id'];

if ($connection->query("DELETE FROM " . $_SESSION['database'] . ".operacion_barcode WHERE op_id='" . $_SESSION['op_id'] . "'") === true) {
    $msg = array("success" => "true", "detalle" => "Detalle ejemplo");

} else {

    $msg = array("success" => "false", "detalle" => $conn);

    // echo "Error: " . $SQLupdate . "<br>" . $conn->error;
}

$json = $msg;
header('content-type: application/json');

echo json_encode($json);

@mysqli_close($connection);
?>