<?php

/* ==========================
   PANCHAYAT MEMBERS
========================== */

$members = mysqli_query($conn,"
SELECT *
FROM village_members
WHERE village_id='$village_id'
ORDER BY id DESC
LIMIT 4
");

?>

<div class="members-section">

<h2 class="section-title">
Panchayat Members
</h2>

<div class="members-grid">

<?php while($row=mysqli_fetch_assoc($members)){ ?>

<div class="member-card">

<?php if($row['image']){ ?>

<img src="/digital_panchayat/uploads/members/<?php echo $row['image']; ?>">

<?php } ?>

<h4><?php echo $row['name']; ?></h4>

<p><?php echo $row['designation']; ?></p>

</div>

<?php } ?>

</div>

<div class="view-more">

<a href="members.php?village=<?php echo $slug; ?>">
View More →
</a>

</div>

</div>