<?php
require_once 'db_admin.php';
checkLogin();

// Prepare and execute the count query
$stmt = $conn->query('SELECT COUNT(*) FROM voters');

// Fetch the result (column 0 contains the count)
$rowCount = $stmt->fetchColumn();

echo "Total voters: " . $rowCount;
?>