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:
Now... How do I make a link to the rest of the posts? (if its over 20 posts?
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);
Comment