sean.ferguson
OSNN Veteran Addict
- Joined
- 4 Jul 2003
- Messages
- 1,693
I have the following code to handle my pages and content:
But this will only work correctly if I give a ?p=something after the initial index.php. I know that there is a statement that gets put in the header of the php file so that if no ?p= statement is given it loads a default, in this case index.php?p=test. I got this code a while back from SPeedY_B so perhaps he will be able to help, but any is appreciated
PHP:
<?php
switch($_GET[p]) {
case test:
include ("test.html"); break;
default:
// Error checking
print "<b>ERROR</b>
<br />\"$p\" Does not exist.
<br />
<br />You may have entered an incorrect URL.
<br />Please refer back to the <a href=\"?p=test\">Index</a> and try again.
";
break;
}
?>
But this will only work correctly if I give a ?p=something after the initial index.php. I know that there is a statement that gets put in the header of the php file so that if no ?p= statement is given it loads a default, in this case index.php?p=test. I got this code a while back from SPeedY_B so perhaps he will be able to help, but any is appreciated