Piranha wrote:Do you get any error messages? If you do then please post them here, otherwise it is hard to know what the problem is.
As far as I can see there may be several problems:
1. My guess would be that $id is not set anywhere and that may cause the problem. try "echo $id" before the switch to see if it is set.
2. It may be a problem that you don't have a break in the default case. Just add it, even if it is not nessecary it is not bad to have it there.
3. Or it may be a problem with one of the included files. To test this try to run it without using the switch.
Ok, I couldn't figre out how to do the echo...But, I took out the switch and the code works fine now....Can you walk me through linking (with a switch me thinks) to intro.php, redhouse.php, brownbear.php and bluetruck.php - with intro.php being default.
Thanks!
This is my new index.php file (without switch)
<html>
<head>
<title>FUSION | Ballwin Baptist Church</title>
</head>
<body>
<?php
ob_start("ob_gzhandler");
?>
<?php include ("header.php"); ?>
<?php include ("navigation.php"); ?>
<?php include ("footer.php"); ?>
</body>
</html>
I figure something was wrong with my switch, but I don't k now what...Also, this is my navigation.php file just for kicks.
<ul>
<li><a href="index.php?id=intro" title="Page intro">Intro</a></li>
<li><a href="index.php?id=bluetruck" title="Blue Truck">Blue Truck</a></li>
<li><a href="index.php?id=redhouse" title="Red House">Red House</a></li>
<li><a href="index.php?id=brownbear" title="Brown Bear">Brown Bear</a></li>
</ul>
And also one of my files (intro.php)
<?php include ("navigation.php"); ?>
<p>This is a simple demonstration of PHP includes and switch conditionals</p>