<?php
// list_users.php
try {
    $pdo = new PDO("mysql:host=localhost;dbname=soca_osce;charset=utf8", "root", "");
    $users = $pdo->query("SELECT id, username, role FROM users")->fetchAll();
    
    echo "<h2>Users in Database:</h2>";
    foreach ($users as $user) {
        echo "ID: {$user['id']} - Username: {$user['username']} - Role: {$user['role']}<br>";
    }
} catch (PDOException $e) {
    echo "Error: " . $e->getMessage();
}
?>