<?php

include "../../config/master.php";
allowRoles([1]);

include "../layout/header.php";
include "../layout/sidebar.php";

$districts = mysqli_query($conn,"SELECT * FROM districts");

?>

<div class="main">

<h2>District List</h2>

<a href="add_district.php" class="btn-success">Add District</a>

<table>

<tr>
<th>ID</th>
<th>District</th>
</tr>

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

<tr>

<td><?php echo $row['id']; ?></td>
<td><?php echo $row['district_name']; ?></td>

</tr>

<?php } ?>

</table>

</div>

<?php include "../layout/footer.php"; ?>