if($_POST['operation'] == "confirmOrderPrint"){
$items = $_POST['items'];
$status = '';
foreach ($items as $value){
$query = "UPDATE orders_print SET id_status = '2' WHERE id_order_print = '" . $value . "'";
$result = db_connection($query);
if($result != 'TRUE') {
$status = 'fail';
break;
}
}
if($status == 'fail'){
echo 2;
} else {
echo 1;
}
exit;
}