Personal I have a paging system that on every page it pulls a content from the database.
In this case it pulls the id "ID of every element of my database", I'm trying to change it so that it takes the "Name" field from my database but I can not, would someone explain it to me?
<?php
$Pagina = (isset($_GET['cadastro'])) ? $_GET['cadastro'] : 1;
$BancoD = "SELECT * FROM cadastro ORDER BY id ASC";
$Val = mysqli_query($conexao,$BancoD);
$Total = mysqli_num_rows($Val);
$Quantidade = 1;
$NumeroPagina = ceil($Total/$Quantidade);
$PaginaInicial = ($Quantidade*$Pagina)-$Quantidade;
$Bancod = "SELECT * FROM cadastro ORDER BY id ASC LIMIT $PaginaInicial,$Quantidade";
$Val= mysqli_query($conexao,$BancoD);
$Total = mysqli_num_rows($Val);
while ($NovelPost = mysqli_fetch_array($Val)){
echo $NovelPost['Nome'];
echo $NovelPost['Idade'];
echo $NovelPost['Cidade'];
echo $NovelPost['Codigo'];
}
?>
I've tried using WHERE Nome=$Pagina
but I could not.