<?php

require "connect.php";


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

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

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

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

        $query = "UPDATE zakazlar SET holati=$holati WHERE Id=$zakaz_id";

        if($conn->query($query) == TRUE){
         echo "ok";
        }else{
         echo "no";

        }


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

$conn->close();
?>
