<?php

// Created by Mr. Developer on 14.09.2020

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


    $us_id = $_POST['us_id'];
    $reg_id = $_POST['reg_id'];
    $dok_id = $_POST['dok_id'];
    $summa = $_POST['summa'];
    $summa_perech = $_POST['summa_perech'];
    $izox = $_POST['izox'];


    date_default_timezone_set('Asia/Tashkent');

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

    $mysql_qry = "INSERT INTO tolovlar (agent_id,region_id,kontr_id,summa, summa_perech,vaqti,izox) VALUES ('$us_id','$reg_id','$dok_id','$summa','$summa_perech','$vaqti','$izox')";

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

}else{
    echo 'no';
}


?>
