prev and next href based on landing page
Posted on 2004-03-28
Instead of creating a numbers system what i am looking for is a simple previous page and next page based on the landing page.
for example my pages are named index-1.php index-2.php etc etc
there is a limit based on the amount of index pages created that part of the script is done.(number of lines per text file divide by 10 per page = $nindexes
I need somehow to create a prev and next based on the number of that index page ($start) would be the varable.
Say a user lands on page 45 the prev should equal page 44 and the next equal page 46
the first page should only have next and the last page should only have prev
the design outputs per page have to tally with the index page number
How would i got about that
One the script know the amount of indexes so say 100 how would you be able to output per page with the above setup.
the thing is that some parts have 500+ indexes and a numbering system is impractical so just a simple prev and next to link to each page until it reaches the last index page.