Re: Someone please help me with this PHP script.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux