<?php 
ob_start();
session_start();
include("inc/config.php");


    $pincode_id = $_POST['id'];
                        	$statement = $pdo->prepare("SELECT * FROM pincode where id='$pincode_id'");
							$statement->execute();
							$result = $statement->fetchAll(PDO::FETCH_ASSOC);
                             foreach ($result as $row) {
                                    $city = $row['city'];
                                    $state = $row['state'];
                                    $service = $row['service'];
                              } 
                              
                              $datas[] = array('city' => $city, 'state' => $state, 'service' => $service);
                              
                         echo json_encode($datas);     
?>