<?php
require_once ("varables.php");

$myJSON=array();
if(isset($_POST["nekot"]) && isset($_POST["rnd"]))
{
	$toke = $_POST["nekot"];
if($toke == "sldiskdjgsoewmvmdpekdjghsncusi"){
    $connect = @mysqli_connect($hostname,$username,$password,$database);
    if($connect)
    {
        @mysqli_query($connect,"SET CHARACTER SET utf8;");
				$select = "SELECT id,C_name,C_mobile,phone,address FROM ".$tbl_customer." WHERE C_id = '' AND C_code = '' AND CHAR_LENGTH(C_mobile)=11";
				$result = @mysqli_query($connect,$select);
				if($result){
				while($rowt = @mysqli_fetch_assoc($result)){
						array_push($myJSON, $rowt);
					}
				}
				else{
					echo @mysqli_error($connect);
					return;
				}
		}
		else{
			echo "401";
			return;
		}
	}
}
else{
	echo "400";
	return;
}

echo json_encode($myJSON);

?>
