I think the title n was very clear but I will explain right here what I need and I am not getting good results.
Well what I'm trying to do is the following.
In the link on my page it stays that way - > "www.site.com/Teste?cadastro=1"
This value "1" is the ID, so that's fine, but what I wanted is another field in my database, such as the Code field.
Making this link look like this - > "www.site.com/Teste?cadastro=A1g667100B"
This is my code.
<?php
$Pagina = (isset($_GET['Codigo'])) ? $_GET['Codigo'] : 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'];
}
?>