I feel like the following script file should work for navigation on my site, but when I click around on the links nothing loads up and nothing loads by default. How do I fix it?
<html>
<head><title>Your Title</title></head>
<body>
Navigation:
<a href="?id=default">News</a>
<a href="?id=what1">Whatever1</a>
<br /><br />
<?php
$id = $_GET;
switch($id)
{
default:
include('home.html');
break;
case "what1":include('whatever1');
break;
case "what2":include('whatever2');
}
?>
</body>
</html>
What are you
$_GETing? Also$_GETreturns an associative array, and theswitchstatement takes a variable. You need to specify what it is you get by giving it an id like$_GET['id'].