<?php 
ob_start();
session_start();
include "../inc/config.php";
$today_date = date('Y-m-d');

 if($_POST['type']=="get_picode_details"){
       
       
    $cust_zip = $_POST['cust_zip'];

$where="";
    
        $statement = $pdo->prepare("SELECT * FROM `pincode` WHERE pin_code = '".$cust_zip."'");
		$statement->execute();
		$result = $statement->fetchAll(PDO::FETCH_ASSOC);
		$totalrow = $statement->rowCount();
		
		if($result){
		    
		    
		    $response['data']=$result;
		    $response['error']=false;
		    $response['message']="Pincode Details Fetched Successfully";
		}else{
		    $response['count']=0;
		    $response['error']=true;
		    $response['message']='failed';
		}
		
		echo json_encode($response);
 
}        

?>