It might be pretty obvious after reading this I'm new to PHP...
Here is my problem:
I've been using a switch statement as a simple one-page site template for a
couple of sites. Here is a simplified version of it:
<head>
<title>
<?php
// This will print the page title passed from the switch statement.
echo $pageTitle;
?>
</title>
</head>
<body>
<?
switch($content)
{
case "foo":
$pageTitle="uno";
break;
case "bar":
$pageTitle="dos";
break;
default:
$pageTitle="Error 404!"; // for error testing
}
echo "<a href=\"switchtest.php?content=foo\">foo</a><br> ";
echo "<a href=\"switchtest.php?content=bar\">bar</a><br> ";
echo "<br>";
echo $pageTitle;
?>
</body>
Everything was working fine until I did a complete re-install of the OS and
php. I'm running OS X 10.1.3, Apache, and php 4.2.0. After the re-install,
php seems to be working fine, I can get the "phpinfo();" page, and my php
sites display ok, but when I click on any of the links in my sites (like
those in the example above) they only show the default page. In other words,
the switch isn't working any more! I created the simplified version above,
just to test out the switch statement, & it didn't work either. I haven't
changed any of the code in my site. The only thing that has changed is
possibly the php version number (I might have been running 4.1..?) & a fresh
installation of the OS. Now none of my sites work locally! Is this a php
configuration issue? Any suggestions? Ideas? Much thanks in advance to
anyone who can help me with this.
D