<a href="index.php" onMouseDown="
<?php
$menuoption = 'rules';
?>">
The above code will give the exact same thing as the below code:
<a href="index.php">
What you need is something like the following: (obviously lay it out a bit nicer tho š)
Name your "page" variable in the links to the exact name of your file (minus the .php extension) then you could also do this:
<!-- NAV LINKS -->
<a href="index.php">Home</a>
<br><a href="index.php?page=section1">Section 1</a>
<br><a href="index.php?page=section2">Section 2</a>
<br><a href="index.php?page=links">Links</a>
<br><a href="index.php?page=guestbook">Guestbook</a>
<!-- END NAV LINKS -->
<?php
if (file_exists($page.".php") && $page != "") {
include($page.".php");
}else{
include("home.php");
}
?>
The reason that the home page is last is so that if someone goes to "index.php?page=someotherpage" then they will be sent to your home page so you dont loose a visitor š
p.s I haven't tested that code so there may be a few small spelling errors.