Your switch statement won't work. In order for it to work, all the "html" code must be contained within the php tags. Otherwise the html code won't be parsed by the PHP. You need to change to this:
PHP Code:
<?php
switch ($tab)
{
case 1:
echo '<b>Tab 1</b>';
echo '<a href="index.php?tab=2">Tab 2</a>';
include("page1.php");
break;
case 2:
echo '<a href="index.php?tab=1">Tab 1</a>';
echo '<b>Tab 2</b>';
include("page2.php");
break;
default:
break;
}
?>
Now as for the url. I don't believe you can do that.
index.php?mypage
You are defining a get variable here called mypage and inserting nothing in it. The ? will see the mypage as a variable and not a value to be used. You will have to put in it like so:
index.php?page=Home
I was looking into "the urls used in wikipedia", I can't for the life of me remember the name of the technique and I couldn't find it anyway. (Probably because I don't know what to look for.) But maybe that's a direction you need to look into.
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”