<!DOCTYPE html>
<html>
<head><title>Login</title></head>
<body>
    <h3>Manage Permissions for Role</h3>
<form method="POST">
    <label for="role_id">Select Role:</label>
    <select name="role_id" id="role_id">
        <?php foreach ($roles as $role): ?>
            <option value="<?= $role->id ?>"><?= $role->name ?></option>
        <?php endforeach; ?>
    </select>

    <h4>Select Sections:</h4>
    <?php foreach ($sections as $section): ?>
        <label><input type="checkbox" name="sections[]" value="<?= $section ?>" /> <?= ucfirst($section) ?></label><br>
    <?php endforeach; ?>

    <button type="submit">Update Permissions</button>
</form>
<a href="<?= base_url('dashboard') ?>">Back to Dashboard</a>
</body>
</html>