Database Articles
  Home arrow Database Articles arrow PHP - Previous and Next Links
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
JMSL Numerical Library 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE ARTICLES

PHP - Previous and Next Links
By: Matt Wade
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2002-02-04

    Table of Contents:
  • PHP - Previous and Next Links
  • The LIMIT Clause
  • Starting Off with $start
  • Building the Previous and Next Links
  • Putting It All Together

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    PHP - Previous and Next Links


    (Page 1 of 5 )

    After reading this tutorial you should be able to add previous and next links to your pages that display data from a database.

    I read several PHP forums on a daily basis. One of the most common requests I see is "How do I add previous and next links to my pages?". Hence this tutorial. When we get done here, you should be able to add previous and next links to your pages that you show database results with.

    For the purposes of this tutorial, I am going to assume that you are already familiar with basic PHP syntax and know how to use PHP to query a database. For the purposes of this tutorial, we will be using MySQL but the theory here should apply to any database.

    For some reference material as we go along, you can look at the MySQL functions and the SELECT command.

    More Database Articles Articles
    More By Matt Wade


       · I love this tutorial and it is great for limit the output of rows, but what if i...
       · Your tutorials are excellent for baby coders like me! Please can u do one on...
       · Great tutorial, Matt.I was making some modifications to a friend's guestbook...
       · Don't you need to _Get $start in order for this code to work?
       · Help me out please, i got this large piece of code, and i wish to use Prev / Next...
       · if globals are off, yes you do.$start=$_GET["start"];
       · Matts code is great, I modified it to resemble googles search results, hopefully...
       · <?php//set the variables for the navigation$start = $_GET['start'];if...
       · Thank you so much for this tutorial. I wa surfing GOOGLE for a couple of days off...
       · I have to say, that this is a great tutorial, very easy to understand. Although, I...
       · Hi MattThank you very much for the tutorial. I found it a perfect solution for my...
       · Instead of:$query = "SELECT count(*) as count FROM...
       · lol, that 'large piece of code' is probably the ugliest thing I've ever seen.
     

    DATABASE ARTICLES ARTICLES

    - More on Query Optimization for Oracle Databa...
    - Query Optimization in Oracle
    - Clusters and Other Data Structures for Oracle
    - Using Indexes with an Oracle Database
    - The Basics of Data Structures in Oracle
    - Oracle Data Structures
    - Best Practices for PL/SQL Variables
    - What`s Code Without Variables?
    - Clauses, Sorting, and SQL Queries
    - The From Clause and SQL Queries
    - Query Primer
    - Full Text Searches and Strings
    - Searching with Strings
    - Pattern Matching with Strings
    - Working with Cases of Strings






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway