Re: Someone please help me with this PHP script.

From: Date: Sun, 18 Dec 2005 15:42:03 +0000
Subject: Re: Someone please help me with this PHP script.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-227603@lists.php.net to get a copy of this message
Zareef Ahmed napisał(a):
Hi, Hi
what is not working in this code? That's how I see it
<? $defaultpage = "http://lom.game-host.org/uploads/erik/"; // yes the isset is ok here If(!isset($page)) {
    $page = "one";
} if($page == "one") { // as far as I know echo is all low case written but maybe it's not a must in all instalations
    echo "<html><head><title>Page One</title></head><body>It works!!<br><a href=\"" . $defaultpage . "index.php?page=two\">Nice...</a></body></html>";
} // else space_here if, not elseif ! else if($page == "two") {
    echo "<html><head><title>Page Two</title></head><body>This is page ".$page." -- <a href=\"".$defaultpage."index.php?page=\">;D</a></body></html>";
} // && instead of || (and instead of or) here to have the opposite! else if( ($page != "one") && ($page != "two") && ($page != NULL) ) {
    echo "<html><head><title>Undefined!</title></head><body>page isn't defined correctly!</body></html>";
} if($page == "") {
    Echo "<br><br><br><br><br><br><br><br><a href=".$defaultpage.">Main Page..</a>";
} ?>
Thank you, You're welcome :)
-- Best wishes Łukasz 'Szift' Hejnak

« previous php.general (#227603) next »