php record paging

Can someone please give me a very straight forward example / tutorial of php recordset paging please
I would prefer having some example files to work on

I know the brief is very loose - I just want to get a handle on the code
doctorbillTechAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hieloCommented:
0
Loganathan NatarajanLAMP DeveloperCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
doctorbillTechAuthor Commented:
question about the text in the link above:

does this need to be defined or is it a php function:

if (isset($_GET['pageno']))
0
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

Loganathan NatarajanLAMP DeveloperCommented:
It has to be defined & checked as "pageno" variable value may come
0
hieloCommented:
>>does this need to be defined
yes.  When you create your pagination links, your code will look similar to:
<a href="yourScript.php?pageno=2">Next</a>

$_GET['pageno'] refers to the pageno in the querystring of your pagination links.  This means that IF you were use a different variable name (for whatever reason) on your links - ex:
<a href="yourScript.php?page=2">Next</a>

then in the article in question, where you see $_GET['pageno'], you would now have to use $_GET['page'].
0
Ray PaseurCommented:
SitePoint has a good explanation with a code example.  It's very old, but stands the test of time well.
http://www.sitepoint.com/perfect-php-pagination/
0
Dave BaldwinFixer of ProblemsCommented:
Here http://www.dibsplace.com/venu/Venulist.php is my version.  I post it so you can look at the info in the query string that is used to 'paginate'  and select different variables for display including the sort order.  I have a slightly different version for editing and I have used it as the basis for editing database info for other sites.
0
Julian HansenCommented:
does this need to be defined or is it a php function:

if (isset($_GET['pageno']))

The full line is

$pageno = isset($_GET['page']) 
  ? preg_replace('/[^0-9]/', '', $_GET['page']) 
  : '';

Open in new window


Which basically says
If the page parameter exists in the URL then set $pageno to the sanitised value of page otherwhise set it to nothing.
The santising just removes anything that is not a numeric character from the string.

So a URL of http://someurl.com/?page=2

Would result in $pageno = 2

But http://someurl.com

Would result in $pageno = ''
0
doctorbillTechAuthor Commented:
Thanks all
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.