multiple pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carp
    New Member
    • Jul 2000
    • 22

    multiple pages

    How do I make a link to multiple pages on a script?

    What I want to do is get some posts from a mysql DB, and if there are over 20 posts, make a link to a second page (or third, fourth, fifth, etc.) which contains something like "script.php?start=21&max=40".

    Heres what I have so far:
    Code:
    <?php
    if ($start=="" and $max=="") {
    $start="0";
    $max="20";
    }
    $post_query = mysql_query("SELECT * FROM posts LIMIT $start,$max");
    $post = mysql_fetch_array($post_query);
    Now... How do I make a link to the rest of the posts? (if its over 20 posts?
  • JohnM
    Senior Member
    • May 2000
    • 622

    #2
    Here's some code to get you started:



    I modified it some to do page.php?pagenum=3 or whatever, instead of page.php?offset=20

    Comment

    • carp
      New Member
      • Jul 2000
      • 22

      #3
      Thanks!
      hey, did you get my message, I put you on the beta tester list.

      C-YA

      Comment

      Related Topics

      Collapse

      Working...