How to insert results pagination into the code below, so it only displays 5 result in the table and make a < 1 2 3 4 >
counter below to show the rest of the result?
<?php header('Content-Type: text/html; charset=iso-8859-1');?>
<?php
$host = "localhost";
$user = "root";
$pass = "";
$banco = "slp";
$conexao = mysqli_connect($host, $user, $pass) or die(mysqli_error());
mysqli_select_db($conexao, $banco) or die(mysqli_error($conexao));
$palavra = $_POST['palavra'];
$sql = mysqli_query($conexao,"SELECT * from cadastros WHERE nomeProfEfetivo LIKE '%".$palavra."%' OR matricula LIKE '%".$palavra."%'");
$row = mysqli_num_rows($sql);
?>
<section class="panel col-lg-9">
<header class="panel-heading">
<br/><br/>
</header>
<?php
if($row>0){
?>
<table class="table table-striped table-advance table-hover">
<tbody>
<tr>
<th><i class="icon_profile"></i> Professor</th>
<th width="15"><i class="icon_profile"></i> Matricula</th>
<th><i class="icon_mail_alt"></i> Unidade</th>
<th width="5"><i class="icon_profile"></i> Modalidade</th>
<th width="5"><i class="icon_mail_alt"></i> Ano</th>
<th width="10"><i class="icon_profile"></i> Turma</th>
<th width="10"><i class="icon_mail_alt"></i> Turno</th>
<th width=""><i class="icon_mail_alt"></i> Tipo do Prof.</th>
</tr>
<?php
while($linha = mysqli_fetch_assoc($sql)){
?>
<tr>
<td width="15">
<?=$linha['nomeProfEfetivo'];?>
</td>
<td width="15">
<?=$linha['matricula'];?>
</td>
<td width="15">
<?=$linha['unidade'];?>
</td>
<td width="15">
<?=$linha['modalidade'];?>
</td>
<td style="text-align:center">
<?=$linha['ano'];?>
</td>
<td style="text-align:center">
<?=$linha['turma'];?>
</td>
<td>
<?=$linha['turno'];?>
</td>
<td style="text-align:center">
<?=$linha['tipo']; ?>
</td>
</tr>
<?php }?>
</tbody>
</table>
<?php
}else{?>
<h4>Nao foram encontrados registros com esta palavra.</h4>
<?php }?>
</section>