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!


Page 5 of 5 FirstFirst 12345
Results 41 to 47 of 47
  1. #41
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    That was a year (And a half) ago , I know ALOT more about php
    Chippiewill.


  2. #42
    Join Date
    Oct 2006
    Posts
    12,405
    Tokens
    0

    Latest Awards:

    Default

    No matter what code I use, all my links just stay at home.php rather than going to their repspective pages, (news.php, values.php, guides.php etc).

    The latest thing I tried was this which I found the basis of earlier in the thread:

    Code:
    <?php
    $_GET['page'];  
    if($page == "home")
    {
    include('home.php');
    }
    elseif($page == "news")
    {
    include('news.php');
    }
    elseif($page == "values")
    {
    include('values.php');
    }
    elseif($page == "guides")
    {
    include('guides.php');
    }
    elseif($page == "knowledge")
    {
    include('knowledge.php');
    }
    elseif($page == "links")
    {
    include('links.php');
    }
    else
    {
    include('home.php');
    }
    
    ?>
    does anyone know how I can make it work?? :eusa_wall

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

    Latest Awards:

    Default

    $_GET['page'];

    should be

    $page = $_GET['page'];

  4. #44
    Join Date
    Apr 2009
    Location
    Illinois, USA
    Posts
    130
    Tokens
    359

    Default

    Here's a very basic one I just whipped up.

    PHP Code:
    <?php
    if ($_GET[p]) {
    $url $_GET[p];
    include(
    $url);
    }else{
      include (
    "main.html");
    }
    ?>
    So the url would be index.php?p=(page).(extension).

    If you don't put ?p=(page).(extension) after index.php, it'll include main.php.

    Example:
    http://yourwebsite.com/index.php?p=home.html


    My last reputation was from ThisNameWillDo!.

  5. #45
    Join Date
    Oct 2008
    Location
    In a box, US
    Posts
    306
    Tokens
    0

    Default

    I perfer .htaccess MOD rewrite ;]
    PureHosts.com
    Shared, ShoutCAST, and reseller hosting.
    Reasonable prices, amazing support.

    Views expressed by me through my HXF, CHF or any forum account, do not necessarily express the views or opinions of Pure Web Solutions.

  6. #46
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    I didn't read all pages, so I'm not sure that if this has been mentioned but when I used to play around with fansites and such, the reason for using an iframe was simply because you could load pages into the current one without disrupting the radio. With his method it would cause the radio to keep restarting, which is frankly quite irritating.

    For a non-radio site though, this is clearly a good method to use.


  7. #47
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Quote Originally Posted by L?KE View Post
    I didn't read all pages, so I'm not sure that if this has been mentioned but when I used to play around with fansites and such, the reason for using an iframe was simply because you could load pages into the current one without disrupting the radio. With his method it would cause the radio to keep restarting, which is frankly quite irritating.

    For a non-radio site though, this is clearly a good method to use.
    Or you have the entire site contained within an iframe with the radio outside the iframe controlled by js from within. Or you could just use javascript to include the content which is safer anyway.
    Chippiewill.


Page 5 of 5 FirstFirst 12345

Posting Permissions

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