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.
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.
Comment