<?php
// array for JSON response
$response = array();

//check for required fields
if ( isset($_POST['AcMobileNo'])&& isset($_POST['CountryClientID'])) {

     
  		$AcMobileNo = $_POST['AcMobileNo'];
  	   
	
   // include db connect class
       require_once __DIR__ . '/../DBConnect.php';
       $CountryClientID = $_POST['CountryClientID'];

		
		///////////////////////////////////////////////
		 $sql1 = "SELECT * FROM Account3Name WHERE AcMobileNo = '$AcMobileNo' AND ClientID ='$CountryClientID' ";
		$params1 = array();
		$stmt1 = $conn->prepare($sql1);
		$stmt1->execute();
		$result1 = $stmt1->fetchAll(PDO::FETCH_ASSOC);
		if($result1!=null &&  $result1>0){
				// success
			$response["success"] = 1;
			$response["message"] = "Mobile No is Already Registered";
			echo json_encode($response);
		}else{
		    $response["success"] = -1;
			$response["message"] = "Mobile No is Not Registered";
			echo json_encode($response);
		}
}else{
             $response["success"] = 0;
			$response["message"] = "Something Wrong";
			echo json_encode($response);
}


?>
