<?php

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


require "connect.php";

$user_id = $_GET['user_id'];
$sorov_turi = $_GET['sorov_turi'];
$sorov_izox = $_GET['sorov_izox'];

$sorov_izox = str_replace('<br />', ' ', $sorov_izox);

mysqli_set_charset($conn,"utf8");

$mysql_qry = "INSERT INTO savollar (user_id,sorov_turi,sorov_izox) VALUES ('$user_id','$sorov_turi','$sorov_izox')";

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

$conn->close();
?>
