View Single Post
Old 10-12-2004, 03:54 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,543
sde is on a distinguished road
this would make a good tutorial, .. but generally here is how you do it ..

you will need to use a variable for the starting record and use it in the url:
http://site.com/gallery.php?s=1

in your code, you will do something like this:
PHP Code:
<?
// set $s to 1 if there is no value
if(!$_GET['s']){
  
$s 0;
}else{
  
$s $_GET['s'];
}

// get six results starting from s
$result mysql_query("select * from table limit ".$s.",6");

// your link for the next page
echo "<a href=\"".$_SERVER['PHP_SELF']."?s=".($s+6)."\">get next page</a>\n";
?>
i didn't test the code, but it should point you in the right direction.

make sense?

a hell of a lot easier than you would do it in rpg huh?
__________________
Mike
sde is offline   Reply With Quote