theres another way to do this
PHP Code:
<?php
switch (urlencode($_GET['go'])) {
case "contact": $inc = 'contact.php';
break;
case "downloads": $inc = 'downloads.php';
break;
default: $inc = 'mainPage.php';
break;
}
include ($inc);
?>
so if i pass this: index.php?go=contact i end up with ocntact.php
if i call index.php i end up at mainPage.php (Because go is null)
if i pass index.php?go=HACK;cat /etc/passwd;
i end up at mainPage because I didnt match the switch.
the urlencode will stop anything nasty being passed in the url