3
I am making a site and on this site, I have a simple pagination site in index.php with the following code:
<?php
function getGet( $key ){
return isset( $_GET[ $key ] ) ? $_GET[ $key ] : null;
}
$pg = getGet('pag');
if( is_file( 'Paginas/'.$pg.'.php' ) )
include 'Paginas/'.$pg.'.php';
else
include 'Paginas/home.php';
I have a page called studies that is in this page above and inside it (page studies), I have a pagination system that passes more parameters $_Get
, as Id, to generate the Count pagination equal to this:
Someone knows the way to pass INDEX?PAG=ESTUDOS
and within study the pagination id? I think it’s something more or less like this index?pag=estudos&1
I just don’t know how to do it.
Usually a pagination is fed by DB content - what you’re doing is manual
is_file( 'Paginas/'.$pg.'.php' )
, you have the filespg1.php, pg2.php, ... pg100.php
physically?– Papa Charlie