<?php

include "../../config/db.php";

$village_id = $_GET['village_id'];

$q = mysqli_query($conn,"
SELECT * FROM gallery_categories
WHERE village_id='$village_id'
");

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

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