Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6

Thread: PHP includes

  1. #1
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default PHP includes

    Anybody know how to make some parts not appear in a php include

    this is the php code on one of my pages home.php which shows the last piece of news

    Code:
    <?php include 'news.php'; echo "$rnews"  ?>
    then on my news.php this is the code:

    Code:
    <?php
    
    $rnews = 'The Last piece of news';
    $news = ' All the rest of the news';
    
    echo "$rnews <br> $news"
    
    ?>
    on the home.php page how can i make this part not appear?

    Code:
    echo "$rnews <br> $news"
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  2. #2
    Join Date
    Jul 2004
    Location
    Bournemouth. UK
    Posts
    3,638
    Tokens
    0

    Latest Awards:

    Default

    Don't include it ?

    I mean like. Not at all just leave it off the page ?
    Last edited by iRoss; 30-05-2005 at 08:04 PM.
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

  3. #3
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default

    but i need it to show when they go onto the news page :p
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  4. #4
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    im confused.
    Why dont you just include it on the pages that need it?

  5. #5
    Join Date
    Jun 2004
    Posts
    1,809
    Tokens
    0

    Latest Awards:

    Default

    im really confused with what u want try explaining it more?
    70 Shaman
    70 Mage
    70 Rogue
    70 Druid
    70 Priest
    63 Paladin

  6. #6
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Lightbulb

    doesnt matter now ive figured it out :p
    PHP Code:
    <?php
    if( $rnews == )
    {
        echo 
    "RECENT NEWS";
    }
    if( 
    $news == )
    {
        echo 
    "OLD NEWS";
    }
    ?>
    so then if i only want the recent news displayed:
    http://www.site.com/news.php?rnews=1
    and for just news:
    http://www.site.com/news.php?news=1
    and if i want both of them displayin:
    http://www.site.com/news.php?news=1&rnews=1
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

Posting Permissions

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