Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Senior Member tha_Gsheep's Avatar
    Join Date
    Feb 2003
    Location
    Scotland
    Posts
    188
    Member #
    780
    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:
    PHP Code:
    function getVars(){
        if(isset(
    $_GET['articleID'])){
            
    $this->articleID $_GET['articleID'];
            
    $this->readArticle();
        }else{
            
    $this->findLinkedArticle();
        }

    ,which checks for an article.
    A little further on in the code I generate the links for the articles like so:
    PHP 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>"
    which gives me a nice big list of the entries from my DB and their articleID's
    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
    www.appletv.co.uk

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:56 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com