connect_error){ die("Ошибка подключения". $mysql->connect_error); } $id = $_POST["id_hider"]; $count_order = $_POST["id_count_s"]; $login = $_POST["login_orders"]; $summ_order = $_POST["summ_order"]; $id_product = $_POST["hide_product"]; $setting = $_POST["hide_c"]; $product_id = $_POST["hide_pr"]; $query = "UPDATE Products SET count_p = count_p - $setting WHERE id = $product_id"; $result = $mysql->query($query); if(!$result){ echo "Что то не так" . $mysql->error; } else{ echo ""; } $query = "DELETE FROM Orders1 WHERE id = $id"; if ($mysql->query($query) === TRUE) { echo ""; } else { echo "Ошибка при удалении записи: " . $mysql->error; } $query = "INSERT INTO Orders (`login`, `count_order`, `summ_order`, `id_product`) VALUES ('$login', '$count_order', '$summ_order', '$id_product')"; $result = $mysql->query($query); if(!$result){ echo "Что то не так" . $mysql->error; } else{ echo ""; } $id = $_POST["id_hide"]; ?> ?>