Adding data from from url in Pagination Class
Posted: 18 May 2019, 18:02
Chief I hope you don't get a headache from me
About a year and a half ago you added an id detection from url in the pagination class from coursesweb.net/php-mysql/pagination-class-script_s2
yesterday I spent 6 hours studying how you did that but I didn't find the solution.
I would like to have album + name from the url also
Album-Pictures.php?name=Guest&album=Nature
The first page is normal working but when i skip to the second page &pg=1
I cant create $name $album into next pages
I need to do something in the class.pagination.pictures.album
but I really don`t know how what to do after many tryouts ???????
About a year and a half ago you added an id detection from url in the pagination class from coursesweb.net/php-mysql/pagination-class-script_s2
yesterday I spent 6 hours studying how you did that but I didn't find the solution.
I would like to have album + name from the url also
Album-Pictures.php?name=Guest&album=Nature
Code: Select all
<?php
$album = isset($_GET['album']) ?(int) $_GET['album'] :'';
$name = isset($_GET['name']) ?(int) $_GET['name'] :'';
//your code ..
?>
I cant create $name $album into next pages
Code: Select all
<?php
$files = glob("albums/upload/Show/Maps/$_GET[name]/$_GET[album]/*.*");
for ($i=0; $i<count($files); $i++)
{
$num = $files[$i];
}
?>
but I really don`t know how what to do after many tryouts ???????
Code: Select all
$re =''; // the variable that will contein the links and will be returned
$pg =($str=='')?'?pg=':'?'.$str.'&pg='; // the name for the GET value added in URL