PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
switch($_GET[page]) should be switch($_GET['page']) .. but I'm not sure that matters.. i dunno
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
switch($_GET['page'])
{
case 'home':
include 'index.php';
break;
case 'console':
include 'console.php';
break;
default:
include 'index.php';
}
Try this for starters. Then check if any includes, are including other files in your switch statement. Where is the switch by the way? In all files, or just a few?
index would only be a default in pages other than index.php - in fact index.php probably shouldn't even have the index.php case full stop - double inclusions?
You go to index.php?page=home. You are now at index.php, with the switch re-including the same page???
You should try placing all page includes into a separate directory, then using index.php simply as a single point of entry. Then have a switch statement in index.php which contains include 'home.php' rather than index.php, with th default set to home.php.
I am not trying to go to index.php?page=home i am trying to access index.php?page=home, so I am trying to load another page called console.php But it still appears with the contents of index.php below it.