Page jump

Everything related to GBook PHP guestbook
Post Reply
FruitBeard
Posts: 38
Joined: Thu Jul 21, 2005 6:25 pm

Page jump

Post by FruitBeard »

Script URL: http://www.fgps.com/keith/GBOOKLATEST/gbook.php
Version of script: 1.41

Hi there,
If you wish to have a page jump function with your gbook, try this.

find inside gbook.php (unmodified version 1.41, line 182) this code:
echo '</p>
and replace it with this code:
$next = $page+1;
if($next >= $pages) $next = $pages;
$previous = $page-1;
if($previous <= 1) $previous = 1;

echo '</p>
<p>
<a href=gbook.php?page=1 title=" First "><< First</a> |
<a href=gbook.php?page='.$previous.' title=" Page '.$previous.' ">< Prev</a> |
<a href=gbook.php?page='.$next.' title=" Page '.$next.' ">Next ></a> |
<a href=gbook.php?page='.$pages.' title=" Last ">Last >></a>
</p>
a working example can be viewed at the url situated at the top of this thread.
FruitFully yours

http://www.fgps.com/keith/
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Thanks!

Moved to Gbook add-ons forum.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply