<form action="send_money.php" method="POST">
    <div class="mb-3">
        <label class="form-label">Select Recipient:</label>
        <select name="recipient_id" class="form-control" required>
            <option value="">-- Choose a user --</option>
            <?php
            require 'config.php';
            session_start();

            $stmt = $conn->prepare("SELECT id, username FROM users WHERE id != ? AND role != 'super-admin'");
            $stmt->bind_param("i", $_SESSION['user_id']);
            $stmt->execute();
            $result = $stmt->get_result();

            while ($row = $result->fetch_assoc()) {
                echo '<option value="' . $row['id'] . '">' . htmlspecialchars($row['username']) . '</option>';
            }
            $stmt->close();
            ?>
        </select>
    </div>

    <div class="mb-3">
        <label class="form-label">Amount:</label>
        <input type="number" name="amount" class="form-control" min="1" step="0.01" required>
    </div>

    <button type="submit" class="btn btn-success w-100">Transfer</button>
</form>
