Posted by £ukasz Hejnak on 12/18/05 17:42
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
[Back to original message]
|