-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathindex.php
More file actions
50 lines (35 loc) · 1.03 KB
/
index.php
File metadata and controls
50 lines (35 loc) · 1.03 KB
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
<?php
/**
* Formulario para generar reporte
*
* Fecha: 17/01/2023
* Autor: Marco Robles
* Web: https://github.com/mroblesdev
*/
require "conexion.php";
$sql = "SELECT id, grado FROM grados";
$resultado = $mysqli->query($sql);
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reporte</title>
</head>
<body>
<h2>Genera reporte de alumnos</h2>
<form action="reporte.php" method="post" autocomplete="off">
<label for="grado">Selecciona el grado: </label>
<select id="grado" name="grado">
<option value="">Selecciona una opcion</option>
<?php while ($fila = $resultado->fetch_assoc()) { ?>
<option value="<?php echo $fila['id']; ?>"><?php echo $fila['grado']; ?></option>
<?php } ?>
</select>
<br />
<button type="submit">Generar</button>
</form>
</body>
</html>