<?php

// Created by Ibrohimjon Ahmadjonov Ilhomjon o'g'li on 09.02.2020

require "connect.php";

$us_id = $_POST['agent_id'];
$dok_id = $_POST['kontr_id'];
$malumot = $_POST['malumot'];
$z_raqam = $_POST['zakaz_raqam'];
$zak_id = $_POST['zak_id'];



mysqli_set_charset($conn,"utf8");
date_default_timezone_set('Asia/Tashkent');

$timestamp = time();
$vaqti = date("d.m.Y H:i:s", $timestamp);

$malumot = $vaqti."^".$malumot;

$mysql_qry = "INSERT INTO zakaz (agent_id,kontr_id,malumot,vaqti,zakaz_raqam, zakaz_int) VALUES ('$us_id','$dok_id','$malumot','$vaqti','$z_raqam','$zak_id')";

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

$conn->close();
?>
