Hey there I'm trying to generate a listing of articles from my DB that when clicked will add the db contents
for that article to a seperate area that contains themain content of the page.
As the page loads it checks for a variable in this code:
,which checks for an article.PHP Code:
function getVars(){
if(isset($_GET['articleID'])){
$this->articleID = $_GET['articleID'];
$this->readArticle();
}else{
$this->findLinkedArticle();
}
}
A little further on in the code I generate the links for the articles like so:
which gives me a nice big list of the entries from my DB and their articleID'sPHP Code:
$get_rants = mysql_query("SELECT * FROM tblarticles LIMIT 4");
while ($array = mysql_fetch_array($get_rants))
{
$mainContent .= "<li>";
if ($array[flag]<>"")
{$mainContent .= "<img src=/art/$array[flag].gif width=17 height=13 align=middle> ";}
$mainContent .= "<a href=\"index.php?[articleID]=$array[id]\" title=\"'$array[title]' posted $array[date]\">$array[title]</a>by ";
$mainContent .= "<a href=\"$array[author]\" title=\"$array[author] profile>>\" class=\"author\">$array[author]</a></li>";
}
$mainContent .= "</ul>";
$mainContent .= "</ul></div>";
but when clicked it just dosen't seem to add the article contents. Can anyone see where I'm going wrong.
It used to work! I just don't know what I've done to it. To see the problem in action go here