PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
]);
} catch (PDOException $e) {
die("Erro na conexão com o banco de dados: " . htmlspecialchars($e->getMessage()));
}
?>
Clientes - Painel Interativo
Clientes
| Nome | Documento | Contato | Ação |
query("SELECT * FROM clientes ORDER BY id DESC");
while ($c = $stmt->fetch()) {
echo "
| " . htmlspecialchars($c['nome']) . " |
" . htmlspecialchars($c['documento']) . " |
" . htmlspecialchars($c['contato']) . " |
|
";
}
} catch (PDOException $e) {
echo "| Erro ao carregar clientes: " . htmlspecialchars($e->getMessage()) . " |
";
}
?>