-
Notifications
You must be signed in to change notification settings - Fork 0
/
listalivros.php
36 lines (32 loc) · 987 Bytes
/
listalivros.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Lista de Livros</title>
<meta charset="utf-8" />
</head>
<body>
<h1>Lista de Livros</h1>
<article>
<table border="1">
<tr>
<td>nome</td>
<td>autor</td>
<td>disponivel</td>
</tr>
<?php
require('conexao.php');
$sql = "SELECT nome_livro, disponivel, autor FROM cadastro_livros";
$res = mysqli_query($mysqli, $sql);
while($row = mysqli_fetch_assoc($res)){
echo "<tr>
<td>". $row['nome_livro'] ."</td>
<td>". $row['autor'] ."</td>
<td>". $row['disponivel'] ."</td>
</tr>";
}
?>
</table>
</article>
<a href="inicio.php">Voltar</a>
</body>
</html>