<?php 
include "config.php";
$pincode = $_POST['pincode'];
$sql = "select * from pincode where pincode like '%$pincode%'";
$conn=mysqli_query($connect,$sql);
while($row=mysqli_fetch_array($conn))
{
    $state = $row['state'];
}

echo $state;
?>