-
Notifications
You must be signed in to change notification settings - Fork 0
/
aleatorio.php
44 lines (41 loc) · 947 Bytes
/
aleatorio.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
<?php
include("banco.php"); // caminho do seu arquivo de conexão ao banco de dados
$consulta = "SELECT * FROM cliente";
$con= $conexao->query($consulta) or die($mysqli->error);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Tutorial</title>
</head>
<style>
table {
border-collapse: collapse;
width: 50%;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even) {background-color: #f2f2f2;}
</style>
<body>
<table>
<tr>
<td>Código</td>
<td>Nome</td>
<td>Ação</td>
</tr>
<?php while($dado = $con->fetch_array()) { ?>
<tr>
<td><?php echo $dado['id_cliente']; ?></td>
<td><?php echo $dado['nome_cliente']; ?></td>
<td>
<a href="usu_editar.php?codigo=<?php echo $dado['id_usuario']; ?>">Editar</a>
<a href="usu_excluir.php?codigo=<?php echo $dado['id_usuario']; ?>">Excluir</a>
</td>
</tr>
<?php } ?>
</table>
</body>