HTML - Alguin Me Puede Ayudar a Activar el Paginador en el siguiente codigo

 
Vista:
sin imagen de perfil

Alguin Me Puede Ayudar a Activar el Paginador en el siguiente codigo

Publicado por Marlon Andino (1 intervención) el 29/04/2022 20:05:01
<?php
require 'conexion.php';

$where = "";

if(!empty($_POST))
{
$valor = $_POST['campo'];
if(!empty($valor)){
$where = "WHERE id_alumnos LIKE '%$valor'";
}
}
$sql = "SELECT * FROM escuelas $where";
$resultado = $mysqli->query($sql);

?>

<html lang="es">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme.css" rel="stylesheet">
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>

<body>

<div class="container">
<div class="row">
<h2 style="text-align:center">Alumnos Registrados</h2>
</div>

<div class="row">
<a href="nuevo.php" class="btn btn-primary">Nuevo Registro</a>

<form action="<?php $_SERVER['PHP_SELF']; ?>" method="POST">
<b>Nombre: </b><input type="text" id="campo" name="campo" />
<input type="submit" id="enviar" name="enviar" value="Buscar" class="btn btn-info" />
</form>
</div>

<br>

<div class="row table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>id_alumnos/th>
<th>nombre</th>
<th>centro</th>
<th>ciudad</th>
<th></th>
<th></th>
</tr>
</thead>

<tbody>
<?php while($row = $resultado->fetch_array(MYSQLI_ASSOC)) { ?>
<tr>
<td><?php echo $row['id_alumnos']; ?></td>
<td><?php echo $row['nombre']; ?></td>
<td><?php echo $row['centro']; ?></td>
<td><?php echo $row['ciudad']; ?></td>
<td><a href="modificar.php?id=<?php echo $row['id_alumnos']; ?>"><span class="glyphicon glyphicon-pencil"></span></a></td>
<td><a href="#" data-href="eliminar.php?id=<?php echo $row['id_alumnos']; ?>" data-toggle="modal" data-target="#confirm-delete"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>

<!-- Modal -->
<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">

<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Eliminar Registro</h4>
</div>

<div class="modal-body">
¿Desea eliminar este registro?
</div>

<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<a class="btn btn-danger btn-ok">Delete</a>
</div>
</div>
</div>
</div>

<script>
$('#confirm-delete').on('show.bs.modal', function(e) {
$(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));

$('.debug-url').html('Delete URL: <strong>' + $(this).find('.btn-ok').attr('href') + '</strong>');
});
</script>

</body>

<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Previous</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#">Next</a>
</li>
</ul>
</nav>

</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder