Results 1 to 5 of 5

Thread: adding content

  1. #1
    Join Date
    Jun 2008
    Posts
    7

    Unanswered: adding content

    i have CMS to manage the content in my website. I add content in CMS like for example I add HOME the content name den it automatically display in my website w/o any changes in the code?

    what i did was, i made dis code below to display each row in the content area


    for($ctr=1;$ctr<=10;$ctr++)
    {
    $result=$connector->query("select * from page_item where id=".$ctr);
    while($p_item=$connector->fetchArray($result))
    {
    $varArray=$p_item['page_name'];
    }
    $arr[$ctr]=$varArray;
    }

    dis will be d output of the code above:

    HOME | ABOUT US | CONTACT US

    the home is equal to $arr[1];
    about us is equal to $arr[2];
    contact us is equal to $arr[3];

    but i do it manually...to display each content...i need to print $arr[4] for the next content
    so it will be HOME | ABOUT US | CONTACT US | IMAGES

    but dis is what i want to happened when i add other content in CMS it will automatically add in the content in my website w/o adding $arr[4]; but i don't know how to resolve it...any advice guyz....

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What are the following "words"?
    • den
    • dis
    • d
    • guyz
    George
    Home | Blog

  3. #3
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    This line is where you have the issue. You need to load your dataset into an array.
    Quote Originally Posted by mahyang
    $arr[$ctr]=$varArray;
    Consider using this:
    PHP Code:
            $i=0;
            while...
            
    $this->Record[$i++] = $this->Row;
            echo 
    $this->Record
    Quote Originally Posted by georgev
    What are the following "words"?
    den
    dis
    d
    guyz
    I have to agree with georgev..
    I shur hopes u cod beter then you wrtes.

    By the way? In one of your last posts, you wrote:
    f u've tym guyz
    Would you please translate that for me cuz I dont git it..
    Last edited by Frunkie; 07-01-08 at 13:36.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by fjm1967
    Would you please translate that for me cuz I dont git it..
    I've a sneaking suspicion it may be
    "If you have the time chaps to waste on my problems"
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Quote Originally Posted by healdem
    I've a sneaking suspicion it may be
    "If you have the time chaps to waste on my problems"
    Ah, now I understand. I was starting to think you were eating code for breakfast. Either you edited that or it just made sense to me now because all I remember reading at the time was "I've a sneaking suspicion it may be"

    I agree. There is also a new one, don't know if you saw it yet.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •