there are numerous posts on the list regarding this subject, I will give
some code examples, I hope this helps.
<?php
include_once("database.egn");
$HOW_MANY = 10;
if (!isset($pos))
$pos = 0;
$pos_prev = $pos - $HOW_MANY;
$pos_next = $pos + $HOW_MANY;
$product_count = fetch_db_value('site', '');
while ($site = fetch_db_value('site', "LIMIT $pos, $HOW_MANY") )
{
echo $site['site_address'] ."<br>\n";
}
echo "
<html>
<body>
";
if ($pos_prev >= 0)
echo "
<a href='$PHP_SELF?pos=$pos_prev'>Back</a>
";
echo "
<a href='$PHP_SELF?pos=0'>Home</a>
";
if ( $pos_next < $product_count )
echo "
<a href='$PHP_SELF?pos=$pos_next'>Next</a>
";
echo "
</body>
</html>
";
?>
simple, no complicated code here :) KISS.
this can be easily modified to handle one at a time, change HOW_MANY = 1;
--
Chris Lee
Mediawaveonline.com
em. [EMAIL PROTECTED]
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
""Chris"" <[EMAIL PROTECTED]> wrote in message
0c8101c09ba4$dfc36400$0100a8c0@NISNix">news:0c8101c09ba4$dfc36400$0100a8c0@NISNix...
> Hi there, I'm having difficulties, hoping I could get some help..
>
> I have two links, "Next" and "Previous". I want the Next button to load
the
> next image, and previous for previous.
> I have the links setup like so: http://bla.com/bla.php?image=# where # is
a
> number, starting with 1. I want for # to increase by one each time a user
> clicks it, as well as load that numbers image. I wanted to define each #
as
> a link to that image.
>
> Thanks,
> Chris
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]