exit;
после echo 1;
if($_POST['operation'] == "confirmOrderPrint"){
$items = $_POST['items'];
foreach ($items as $value){
$query = "UPDATE orders_print SET id_status = '2' WHERE id_order_print = '" . $value . "'";
$result = db_connection($query);
if($result != 'TRUE') {
echo 2;
}
}
echo 1;
exit;
}