-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathver_matricula.php
56 lines (47 loc) · 1.74 KB
/
ver_matricula.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
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script>
function confirmarExclusao(numeroMatricula)
{
return confirm("Tem certeza que deseja excluir a matricula " + numeroMatricula + "?");
}
</script>
<title></title>
</head>
<body>
<table border = 1>
<thead>
<th>Nome do aluno</th>
<th>Nome do curso</th>
<th>Deletar</th>
</thead>
<tbody>
<?php
include 'conexao.php';
$consulta_matricula = "SELECT matricula.cod_matricula, aluno.nome_aluno, curso.nome_curso, matricula.numero_matricula FROM aluno, curso, matricula
WHERE matricula.cod_aluno = aluno.cod_aluno
AND matricula.cod_curso = curso.cod_curso";
$consulta = mysqli_query($conexao, $consulta_matricula);
while ($linha = mysqli_fetch_array($consulta)){
$numeroMatricula = $linha['numero_matricula'];
print '<tr><td>' . $linha['nome_aluno'] . '</td>';
print '<td>' . $linha['nome_curso'] . '</td>';
?>
<td>
<a href="deleta_matricula.php?cod_matricula= <?php print $linha['cod_matricula'];?>
"onclick=" return confirmarExclusao('<?php print $numeroMatricula ?>')">
<input type="submit" value="DELETAR MATRÍCULA">
</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</body>
</html>