Strange PHP problem

T

TheJkWhoSaysNi

Guest
i used to have my index page like this:

Code:
if ($page == 'Ranks'){
$title = 'Ranks';
include("header.php");
content("<ranks>");
include("footer.php");

And as you can see it works:
http://www.ud.barrysworld.net/index.php?page=Ranks

However, i am trying to change the index page so it is more efficient:

Code:
Function Type1() {
    $title = str_replace("_", " - ", "$page");
    global $page,$username;
    echo("page: $page,$username");
    $content = '$page';
    include ("header.php");
    content("<$content>");
    include("footer.php");
}
         
         
if($page == 'Ranks' || 'Rules' || 'About' || 'History' || 'Links'){
    Type1();
}

That doesnt work! it dies half way through header.php:

http://www.ud.barrysworld.net/indextest.php?page=Ranks

The line its dying on is:

<? include("board/user.php"); ?>

but both user.php and header.php work correctly on their own (And using the old method)

http://www.ud.barrysworld.net/header.php
http://www.ud.barrysworld.net/board/user.php

Does anyone have any idea why its not working?

Thanks for any help.
 
T

TheJkWhoSaysNi

Guest
okay.. i've figured a little out, using include("board/user.php") it messes the page up, but using the whole url it works! However, i'm not logged in to the site :(
 
T

TheJkWhoSaysNi

Guest
by putting the code from user.php into header.php it works, oh well.
 

Users who are viewing this thread

Top Bottom