RE: [PHP] Back/Forward
| From: | scott [gts] | Date: | Wed, 11 Jul 2001 18:54:58 +0000 |
| Subject: | RE: [PHP] Back/Forward | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57473@lists.php.net to get a copy of this message | ||
how do you have the data stored?
by ID number?
if you have it stored by ID number, just
put next/back links something like this:
<?
// here, find out the max number of rocks
$prev = (($id>0)? $id-1 : 0 );
$next = (($id<$max)? $id+1 : $max );
?>
<A HREF="rock.php?id=<?= $prev ?>">previous</A>
<A HREF="rock.php?id=<?= $next ?>">next</A>
> -----Original Message-----
> From: Devin Atencio [mailto:dreamboy@aros.net]
> Sent: Wednesday, July 11, 2001 2:53 PM
> To: php-general@lists.php.net
> Subject: [PHP] Back/Forward
>
>
>
> I have a page that brings up the info on a rock, I wanted to
> add the functionality of doing like a <next> and <previous> option
> to go thru all the rocks in my database. I can't figure out how
> to exactly do this, could someone give me some help?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>