Pagination Script using GET attributes and DIVs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eragon
    Contributor
    • Mar 2007
    • 431

    Pagination Script using GET attributes and DIVs

    i have a news archive on my website that is all compiled into 1 php pages and several inc pages containing the news article. When the page is first loaded, the div called "page1" is loaded, which conatins the titles of the first 10 news articles. when the attribute news.php?page=2 is called the div called "page1" is hidden and the div called "page2" is shown. this continues for however many divs i have on the page.

    if the user clicks on the title of a news article it calls the attribute news.php?articl e=101 where 101 is the news article. it then hides all the divs with the news titles on them, and shows the other div with the article layout on it. this div looks like this:

    [php]
    <div id="article">
    <?php
    $article = $_GET['article'];
    include(.$artic le.'.inc');
    ?>
    </div>
    [/php]

    the code above needs proper syntax. the inc file just includes the news article.

    if you need more information, ask me.
  • eragon
    Contributor
    • Mar 2007
    • 431

    #2
    nevermind, case closed. if anybody wants a pagination script aske either me or google ;)

    Comment

    Working...