SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Pagination?

  1. #1
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,657
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Pagination?

    I applied pagination to this page
    http://mycorenetwork.com/asp/reviews/index.php?page=1
    using
    http://www.dynamicdrive.com/style/cs...ination_links/
    as an example
    I got stuck in trying to get the previous button to work.
    Heres the php code I have in that spot, why is this not working
    PHP Code:
    $total_pages ceil($total_records 20); 

    if (
    $page==2) {  echo "<li><a href='index.php?page=1' class='prevnext'> previous</a></li>"; } else if ($page==1) { echo "<li><a href='index.php?page=1' class='prevnext disabledlink'> previous</a></li>"; }
    for (
    $i=1$i<=$total_pages$i++) { 
                echo 
    "<li><a href='index.php?page=".$i."'>".$i."</a></li>"

    Thanks..
    "Oh, and Jenkins--apparently your mother died this morning."

  2. #2
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,657
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    nvm
    "Oh, and Jenkins--apparently your mother died this morning."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •