Select form via checkbox

0

Good night everyone.

All users who are in the database are listed in a table, however, with each user created, along comes the DELETE AND EDIT buttons. Do you know how I can access these entries via checkbox, both to edit and delete, to have just one button each?

The code that lists, looks like this:

<table border="0" width="100%">
    <tr>
        <th>Usuário</th>
        <th>Cargo</th>
        <th>E-mail</th>
        <th>Telefone</th>
        <th>Ações</th>
    </tr>
    <?php foreach($users_list as $us): ?>
    <tr>
        <td><?php echo $us['names']; ?></td>
        <td><?php echo $us['cargo']; ?></td>
        <td><?php echo $us['email']; ?></td>
        <td><?php echo $us['telefone']; ?></td>
        <td width="160">
            <div class="button button_small"><a href="<?php echo BASE_URL; ?>/users/edit/<?php echo $us['id']; ?>">Editar</a></div>
            <div class="button button_small"><a href="<?php echo BASE_URL; ?>/users/delete/<?php echo $us['id']; ?>" onclick="return confirm('Tem certeza que deseja excluir?')">Excluir</a></div>
        </td>
    </tr>
    <?php endforeach; ?>
</table>

Thank you

    
asked by anonymous 17.08.2018 / 23:22

0 answers