-
Notifications
You must be signed in to change notification settings - Fork 0
/
lista.php
50 lines (45 loc) · 2.05 KB
/
lista.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
49
50
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Japa Quiz</title>
<link href="_css/estilo.css" rel="stylesheet">
</head>
<body>
<main>
<header>
<nav>
<ul>
<li><a href="index.php">Quiz</a></li>
<li><a href="cadastro.html">Cadastro</a></li>
<li><a href="lista.php">Lista</a></li>
</ul>
</nav>
</header>
<section>
<h1>Listagem de Kanas</h1>
<hr>
<?php
header('Content-Type: text/html; charset=utf-8');
$servidor = "localhost";
$usuario = "root";
$senha = "";
$banco = "japa";
$strcon = mysqli_connect($servidor,$usuario,$senha,$banco) or die('Erro ao conectar ao banco de dados');
$sql = "SELECT * FROM japa;";
$data = mysqli_query( $strcon,$sql );
echo "<table><tr><th>Kana</th><th>Pronuncia</th><th>Significado</th><th>Num. Traços</th><th>Grade</th><th> </th></tr>";
while( $l =$row = $data->fetch_assoc() )
{
echo "<tr><td>" . $l['kana'] . "</td><td>" . $l['pronuncia'] . "</td><td>" . $l['significado'] . "</td><td>" . $l['numTraco'] . "</td><td>" . $l['grade'] . "</td><th><a class=\"apagar\" href=\"deleta.php?kana=" . $l['kana'] . "\">Apagar</a> - <a class=\"apagar\" href=\"edit.php?kana=" . $l['kana'] . "\">Editar</a></th></tr>";
}
echo "</table>";
mysqli_close($strcon);
?>
</section>
<footer>
Programado por Makswel F. Cunha -
<a href="mailto:arkannun@gmail.com?Subject=Japa%20Quiz" target="_top">arkannun@gmail.com</a> - MCA - 2019
</footer>
</main>
</body>
</html>