<?php

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


require "connect.php"; 

$user_id = $_POST['user_id'];   
$sorov_id = $_POST['sorov_id'];   
$javob = $_POST['javob'];          

mysqli_set_charset($conn,"utf8");

$mysql_qry = "INSERT INTO javoblar (user_id,sorov_id,javob) VALUES ('$user_id','$sorov_id','$javob')";

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

$conn->close();
?>