Created
April 9, 2019 22:03
-
-
Save erick-jeronimo/7df25186c3d922524f0c34f7511d9434 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 "  <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