Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Controle de Usuário</title>
- </head>
- <body>
- <?php
- require 'arquivoConectar.php';
- ?>
- <a href="adicionar.php">Adicionar novo usuário</a>
- <table border="0" width="100%">
- <tr>
- <th>Nome</th>
- <th>E-mail</th>
- <th>Ações</th>
- </tr>
- <?php
- $sql = "SELECT * FROM usuarios";
- $sql = $con->query($sql);
- if ($sql->rowCount() > 0) {
- foreach ($sql->fetchAll() as $usuario) {
- echo "<tr>";
- echo "<td>".$usuario['nome']."</td>";
- echo "<td>".$usuario['email']."</td>";
- echo '<td><a href="editar.php?id='.$usuario['id'].'">Editar</a> - <a href="excluir.php?id='.$usuario['id'].'">Excluir</a></td>';
- echo "</tr>";
- }
- }
- ?>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement