<?php

require_once('connect.php');


if ($_SERVER['REQUEST_METHOD'] == 'POST') {

    if ($_POST['dastavshik_id']!="" && $_POST['holati']!="" ) {

        $zakaz_id = $_POST['zakaz_id'];
        $dastavshik_id = $_POST['dastavshik_id'];
        $holati = $_POST['holati'];

        mysqli_set_charset($conn,"utf8");
        $query = mysqli_query($conn,"SET NAMES utf8");
 

        $query = "UPDATE zakaz SET dastavshik_id=$dastavshik_id,holati=$holati WHERE Id=$zakaz_id";

        if(mysqli_query($conn, $query)){
         echo "ok";
        }else{
         echo "no";

        }


    }else{
          echo "no_c";
    }
}
else
{
     echo "error";
}

$conn->close();
?>