<?php 
ob_start();
session_start();
include("inc/config.php");
    $pincode_mode = $_POST['pincode_mode'];
    $pincode_type = $_POST['pincode_type'];
    $pincode = $_POST['pincode'];
    if($pincode_mode=='air')
    {
        $mode='air';
    }
    elseif($pincode_mode=='surface')
    {
      $mode='road';  
    }
    
                        	$statement = $pdo->prepare("SELECT * FROM pincode where pin_code=".$pincode." AND ".$mode."='Yes' AND ".$pincode_type."='Yes' ");
							$statement->execute();
							$result = $statement->fetchAll(PDO::FETCH_ASSOC);
							$total_pincode = $statement->rowCount();
							
                                                if($total_pincode>0){
                            
                                                   echo 1;   
                                                 }
                                              else
                                                    {
                                                         echo 0;
                                                    }
?>