-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagencia-consulta.php
48 lines (46 loc) · 1.59 KB
/
agencia-consulta.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php include("agencia-c.php");
$grupo = selectTodos();
//var_dump($grupo);
?>
<html lang="pt-br">
<head>
<title>Consulta - Agência</title>
<meta charset="utf-8">
</head>
<body>
<table border="1">
<thead>
<tr>
<th>Código:</th>
<th>Nome</th>
<th>Cidade</th>
<th>Editar</th>
<th>Excluir</th>
</tr>
</thead>
<tbody>
<?php foreach ($grupo as $Agencias) { ?>
<tr>
<td><?=$Agencias["idAgencia"]?></td>
<td><?=$Agencias["nomeAgencia"]?></td>
<td><?=$Agencias["cidadeAgencia"]?></td>
<td>
<form nome="alterar" action="agencia-a.php" method="POST">
<input type="hidden" name="idAgencia" value=<?=$Agencias["idAgencia"]?> />
<input type="submit" name="Editar" value="Editar" />
</form>
</td>
<td>
<form name="excluir" action="agencia-c.php" method="POST">
<input type="hidden" name="idAgencia" value=<?=$Agencias["idAgencia"]?> />
<input type="submit" name="acao" value="Excluir" onclick="alert('Cadastro excluído com sucesso.');"/>
</form>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<br>
<a href="index.html">Voltar ao início</a>
</body>
</html>