daily pastebin goal
91%
SHARE
TWEET

Controle de Usuarios

HeldrMacedo Mar 13th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Controle de Usuário</title>
  6. </head>
  7. <body>
  8.     <?php
  9.         require 'arquivoConectar.php';
  10.  
  11.     ?>
  12.     <a href="adicionar.php">Adicionar novo usuário</a>
  13.     <table border="0" width="100%">
  14.         <tr>
  15.             <th>Nome</th>
  16.             <th>E-mail</th>
  17.             <th>Ações</th>
  18.         </tr>
  19.  
  20.     <?php
  21.         $sql = "SELECT * FROM usuarios";
  22.         $sql = $con->query($sql);
  23.  
  24.         if ($sql->rowCount() > 0) {
  25.             foreach ($sql->fetchAll() as $usuario) {
  26.                 echo "<tr>";
  27.                 echo "<td>".$usuario['nome']."</td>";
  28.                 echo "<td>".$usuario['email']."</td>"; 
  29.                 echo '<td><a href="editar.php?id='.$usuario['id'].'">Editar</a> - <a href="excluir.php?id='.$usuario['id'].'">Excluir</a></td>';       
  30.                 echo "</tr>";
  31.             }
  32.         }
  33.     ?>
  34.     </table>
  35.  
  36.  
  37. </body>
  38. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top