Hi,
I wonder if someone can help me, I've set my web site up as follows:
There is a 'services' page that displays .html pages in a sub-dir when
specified in the URL. I need use the switch function as the code
following shows:
<?php if(isset($_GET['p']))
{
switch ($_GET['p'])
{
// include ('test.inc');
case "test": include "./services/test.html"; break;
case "2test2": include "./services/2test2.html"; break;
default:
}
}
else
{
echo "<p><br><br><B>Please choose a topic from the left</B></p>\n";
}
?>
Basically.. I want to use the include(test.inc) file which contains
the two lines of code following it. But I get an error:
Parse error: parse error, expecting `T_CASE' or `T_DEFAULT' or `'}''
in /home/rmgraphics/public_html/services.php on line 27
- which is the include page line and I've commented out for now
I need to use the test.inc file for the case lines because I want to
manage the list by opening the file direct.
This is a bit over my head now.. I'm sure someone knows a good
workaround!
Thanks in advance
FrobinRobin