-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClassDrama.html
35 lines (31 loc) · 1009 Bytes
/
ClassDrama.html
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
<HTML>
<HEAD>
<TITLE>Lista</TITLE>
<link rel="stylesheet" type="text/css" href="style.css">
</HEAD>
<BODY>
<table align= "center" width = 60% border = "1" bordercolor = white>
<td>
<!-- exibimos, aqui, todos os dados inseridos até então no banco
("Filmes" é o nome da tabela) -->
<?php
include "connect_Mysql.php";
$pega_dados = mysql_query("SELECT * FROM drama");
echo "<font color=red><b>
CREATE VIEW drama AS<br />
SELECT * <br />
FROM filmes <br />
WHERE filmes.nome_categoria = 'Drama' <br /><br />
SELECT * FROM drama</b></font><br /><br />";
while($mostra_dados = mysql_fetch_array($pega_dados)){
$titulo = $mostra_dados['titulo'];
$nome_categoria= $mostra_dados['nome_categoria'];
// Resultados na tela
echo "<b>Título:</b> $titulo<br />";
echo "<b>Categoria:</b> $nome_categoria<br /><br />";
}
?>
</td>
</table>
</BODY>
</HTML>