Hi Martin,
It's important to know that "Stuff" in the Url like this are just
variables. For example :
foo.php?fruit=apples&dog=snoopy&others=huh&more=yep
Now with foo.php we can do this (a few exceptions) :
echo "$dog would like to each some $fruit";
And in your case, you have $page so let's compare your $page variable
and include files accordingly. We'll be using an if statement which can
be read about here :
http://www.php.net/manual/en/control-structures.php
This will do the job :
<?php
if ($page == 'visual') {
echo '<h3>Visual Stuff is Good!</h3>';
include 'visual.txt';
} elseif ($page == 'audio') {
echo '<h3>Welcome to Musical Section!</h3>';
include 'audio.inc';
} else {
echo '<h3>Welcome to my site!</h3>';
include 'default.php';
}
?>
Yes there are other ways but this is the simplest and you should (and
will!) learn to use if/elseif/else which will be useful in the future.
Regards,
Philip Olson
http://www.cornado.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]