<?php
include("../config/db.php");

$block_id = $_GET['block_id'];

$q = $conn->query("SELECT * FROM villages WHERE block_id='$block_id'");

echo "<option value=''>Select Village</option>";

while($row = $q->fetch_assoc()) {
    echo "<option value='".$row['id']."'>".$row['village_name']."</option>";
}