<?php

// Created by Ibrohimjon Ahmadjonov Ilhomjon o'g'li on 10.02.2020
header('Content-type: text/html; charset=UTF-8');
require "connect.php";


$umum_soni = 0;

$user_id = $_GET['user_id'];
$sorov_id = $_GET['sorov_id'];
$count=1;

$sql_sorov = "SELECT Id,javob FROM javoblar WHERE user_id = '$user_id' AND sorov_id = '$sorov_id'";

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

if ($javob !== false && $javob->num_rows > 0) {
    while($row=mysqli_fetch_array($javob)){

    	$Id=$row['Id'];
		$javob2=$row['javob'];
		$javob2 = str_replace('"', '`', $javob2);
		if($javob2 == ""){
		    echo "0";
		} else {
		    echo $javob2;
		}
		$conn->close();
		return;
    }
}
echo 'no';
$conn->close();
?>
