Skip to content

Instantly share code, notes, and snippets.

@erick-jeronimo
Created April 9, 2019 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erick-jeronimo/7df25186c3d922524f0c34f7511d9434 to your computer and use it in GitHub Desktop.
Save erick-jeronimo/7df25186c3d922524f0c34f7511d9434 to your computer and use it in GitHub Desktop.
<?php
include '../../utils/bd.php';
$stmt = $conn->prepare("SELECT * FROM cliente");
$stmt->execute();
?>
// corpo da pagina...
// cabecalho da tabela...
<?php
while ($row = $stmt->fetch(PDO::FETCH_ASSOC))
{
$id = $row['idcliente'];
echo '<tr>';
echo "<td align='center'>" . $row['nome'] . '</td>';
echo "<td align='center'>" . $row['email'] . '</td>';
echo "<td align='center'>" . $row['cnpj'] . '</td>';
echo "<a href='excluir.php?id=$id' title='Editar Cliente'>Excluir</a>";
echo "&nbsp;&nbsp<a href='editar.php?id=$id' title='Editar Cliente'>Editar</a>";
echo '</tr>';
}
?>
// fechamento da tabela
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment