I am trying to make a load system on demand and I do not know anything about ajax and I did not quite understand how it would work.
I have a post system that shows a 10 post quantity on my page, and when I click on my second page (pagination) it shows 10 more and so until I finish my post from the bank.
What I wanted to do was to do a "Load button more on demand" system without having to go to another page.
My file that shows my posts
<?php
$conexao = mysqli_connect("host", "jubileu", "1dois");
mysqli_select_db($conexexao,"nada");
$pagina = (isset($_GET['pagina']))? $_GET['pagina'] : 1;
$cmd = "SELECT * FROM Banco_opa ORDER BY id DESC";
$empresa = mysqli_query($conexexao,$cmd);
$total = mysqli_num_rows($empresa);
$registro = 10;
$numPaginas = ceil($total/$registro);
$inicio = ($registro*$pagina)-$registro;
$cmd = " SELECT * FROM Banco_opa ORDER BY id DESC LIMIT $inicio,$registro";
$empresa = mysqli_query($conexexao,$cmd);
$total = mysqli_num_rows($empresa);
while ($BancoID = mysqli_fetch_array($empresa)){echo'<div class="Post">'.$BancoID['ID'].'</div>';}
?>
If someone can help me vlw ^^