
{% extends "layout.html" %}
{% block content %}
    <h2>Users List</h2>
    <p>This page fetches dynamic data from the <code>users</code> table.</p>
    
    {% if data %}
        {% for user in data %}
        <div class="user-card">
            <strong>ID:</strong> {{ user.id }} <br>
            <strong>Name:</strong> {{ user.name }} <br>
            <strong>Role:</strong> {{ user.role }}
        </div>
        {% endfor %}
    {% else %}
        <p>No users found in the database.</p>
    {% endif %}
{% endblock %}
