How to do Prev | Next on a website.

Posted on 2004-12-01
Last Modified: 2012-05-05
I am still relatively new to website development.  I am using Dreamweaver MX and the site is hosted on a Unix platform.

There is a feature I would like to implement.  Often I read forums and I like the prev | next functionality.  I often read about 50 entries before getting tired and I find some of the postings very interesting.

I want to give my readers a way to see all I am doing on a day-by-day basis to highlight all of my expertise.  

For non-web apps, I know I would never 'hard code' such info.  

I don't want to code an entire 'forum' as that's probably over my head, but I would like to know how to code unlimited prev | next functionality.  Each page would correspond to an 'interesting day' I had.  

Put the stuff in a native O/S text file?  a database entry? I looked at the source code for TechRepublic forum but I don't believe I'm seeing the server-side code.

Any help would be appreciated.
Question by:supportoranges
    LVL 14

    Expert Comment

    I really don't understand what you want to do besides dividing your forum in pages.
    Are you looking for suggestions or just a summary of the requirements?

    Basically, since you are using Unix you probably have PHP and/or Perl available, that would be your Server Side Scripting Language. The info storage dependes on your resources and needs. I personally have working forums using both. If you are not going to have that many visitors/posters using a text file shouldn't be a problem.

    LVL 10

    Expert Comment

    just create a database, create a table with a few fields to hold your 'interesting day' text then have a php page query the records in desc order.  then you can limit the number of 'days' to a couple and have next prev to query the others.

    But to add to Esopo, I REALLY dont understand what you are trying to do.
    Either way , (HTML, dynamic) you are going to have to insert pages or records ona daily basis.  If you have limited exp in databases, just stick with html pages and have the prev next link to the other html pages.

    LVL 1

    Author Comment

    Thanks guys.  I have extensive system and database and programming experience, but limited web and PHP.  I have done ASP.

    You mean desc order on date so the most recent stuff is shown first?  It won't be a problem for me to retrieve/display records.

    Do I use something like a session variable to keep track of the page the user is viewing?  Would that be just a vanilla php variable?  

    To reiterate:  all I am trying to do is code some prev | next functionality so there is no limit to the pages which can be dynamically created and shown.  Each page will have the same format and the content is about cool stuff which happens each day.  This 'diary' gives viewer a better insight into myself and my company.  Also, don't want to maintain separate html for each page.  Dynamic for me would be the best way to go.

    Thank you for your assistance.


    LVL 10

    Accepted Solution

    If you are using MX, then this is EASY. (if you choose to let it do that for you )

    Just open a new php file, then add the database connection in the application panel
    add a query in the bindings panel
    then make the paeg look as you wish
    THEN under the application TAB, there is a 'recordset pageing' button.
    youcan tell it how to look and it will place the proper buttons for you.

    It does all the sql code for you, you then can adjust it as yo see fit.

    LVL 14

    Expert Comment

    And I was getting ready to paste 20 lines of code. Sometimes I forget this is the DW area ;)
    LVL 10

    Expert Comment

    I started to, but I re-read the question, just in time.

    I am still relatively new to website development. .......For non-web apps, I know I would never 'hard code' such info....

    I assumed he was looking for built-in stuff if possible.

    Good Luck supportoranges
    LVL 14

    Expert Comment

    And by the way, Welcome to EE!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
    Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now