How to create next botton

Discussion in 'PHP' started by adsegzy, Aug 7, 2010.

  1. #1
    Hello friends, I have list of items(products) in my database, and i echo them on my catalogue page, when you click on an item you will have to come back to the catelogue page before you can click on the next item. pls how do i script a link (NEXT or PREVIOUS) so that when the visitor can click on NEXT botton in order to see the detail of the next item without first going back to the catelogue page? (Eg when reading a message in your Yahoo, Gmail or Hotmail inbox, you can move to the next message by clicking on next without going back to your INBOX).

    Pls I need the syntax.

    regards
    adsegzy
     
    adsegzy, Aug 7, 2010 IP
  2. GetGamesHere

    GetGamesHere Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    When the page loads, determine the next and previous products and build their urls. When you display the next and previous button, add the url to href attribute.

    
    echo "<A href='$nextpageurl'><IMG src='/nextbutton.png'/></A>";
    
    PHP:
     
    GetGamesHere, Aug 8, 2010 IP