<?php

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

/* GET VILLAGE SLUG */

$slug = $_GET['village'] ?? '';

if($slug == ''){
echo "Village not selected";
exit;
}

/* FETCH VILLAGE */

$village = mysqli_fetch_assoc(mysqli_query($conn,"
SELECT * FROM villages WHERE slug='$slug'
"));

if(!$village){
echo "Village not found";
exit;
}

$village_id = $village['id'];

include "header.php";
include "home.php";
include "footer.php";

?>