Jump to content

Link for previous and Next reccord


Fallen_angel

Recommended Posts

Hi ,

I am building a FAQ system , everything has come together nicely and now I'm just trying to add a few more usability features to it ,

the thinhg in particular that i need assistance with is a link to move to the previous reccord and also the next reccord of the database , that way te users can flick through the guides without having to go back to the main menu

the pages themselfs are accessed by going to www.domain.com/mainpage.php?id='faq-id'

How would i go about creating the links to go back one reccord or forward one reccord as this obiosly has to change with the faq being viewed

Thanx allot to anyone that can assist me



Link to comment
Share on other sites

Yes they are sequential numbers and I understand how to manually navigate to them via url

what i am not sure of is how to make the two links  for next and previous on the fly each time a page is loaded ,

would something like the bellow work or am i on the righ track ?

[code]$previous=$info['id'] - 1 ; 
$next=$info['id'] + 1  ;  [/code]

Link to comment
Share on other sites

Ok so I have this working except I can see a small issue that I'm not sure if I can fix or not , so thought I shoudl ask here

once they get to the final existing reccord they can still click next tutorial and get a blank layout page that would normally be populated with info , Is there a way for me to have a default error page for if there is no information in the database that matches the search they get that instead of a blank layout page, the main reason beign that they can just click over and over and never find anythgin which could be confusing to some  or is it even possible to make it so that the final row doesn't show the next tutorial link ?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.