-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnuevoModal.php
47 lines (40 loc) · 2.28 KB
/
nuevoModal.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
<!-- Modal nuevo registro -->
<div class="modal fade" id="nuevoModal" tabindex="-1" aria-labelledby="nuevoModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="nuevoModalLabel">Agregar registro</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="guarda.php" method="post" enctype="multipart/form-data">
<div class="mb-3">
<label for="nombre" class="form-label">Nombre:</label>
<input type="text" name="nombre" id="nombre" class="form-control" required>
</div>
<div class="mb-3">
<label for="descripcion" class="form-label">Descripción:</label>
<textarea name="descripcion" id="descripcion" class="form-control" rows="3" required></textarea>
</div>
<div class="mb-3">
<label for="genero" class="form-label">Género:</label>
<select name="genero" id="genero" class="form-select" required>
<option value="">Seleccionar...</option>
<?php while ($row_genero = $generos->fetch_assoc()) { ?>
<option value="<?php echo $row_genero["id"]; ?>"><?= $row_genero["nombre"] ?></option>
<?php } ?>
</select>
</div>
<div class="mb-3">
<label for="poster" class="form-label">Poster:</label>
<input type="file" name="poster" id="poster" class="form-control" accept="image/jpeg">
</div>
<div class="">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cerrar</button>
<button type="submit" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i> Guardar</button>
</div>
</form>
</div>
</div>
</div>
</div>