<?php
	include('../include/config.php');
	$date = new DateTime("now", new DateTimeZone('Africa/Nairobi') );
    $timenow=$date->format('Y-m-d H:i:s');
    $timenow2=$date->format('Y-m-d');
    $iduser=$_SESSION['user_id'];

   $sql = "select * from Sta ORDER BY Name DESC";
	$result = $con->query($sql);
	if ($result->num_rows > 0) 
	{
	    $cnt='1';
		while($row = $result->fetch_assoc()) 
		{
    ?>	
		<tr>
			<td><?php echo $cnt; ?></td>
			<td><?php echo $row["Name"]; ?></td>
			<td><?php echo $row["IDNo"]; ?></td>
			<td><?php echo $row["Phone"]; ?></td>
			<td><?php echo $row["Email"]; ?></td>
			<td>
                <input type="hidden" value="<?php echo $row["id"]; ?>" class="stafidd" />
                <i class="fa fa-edit text-green btn bstaffedit" id="bstaffedit"></i> | <i class="fa fa-trash btn text-danger" id="bedit"></i>
			</td>
		</tr>
    <?php
    $cnt=$cnt+1;
	}

	}
	else {
		echo "0 results";
	}
		
	mysqli_close($con);
?>