I'm trying to run the following php code.
But I keep getting this error whenever I excute it
Parse error: parse error, unexpected T_INCLUDE in /home/surrix/public_html/test.php on line 41
The code is supposed to be switching out the content that appares in one of the tables when a link is click on and the links would look something like this www.surrix.net/index.php?nav=forums or whatever but I can't get it to work what is wrong with it?
PHP Code:
<?php
switch($nav)
{
case "about"
include ("about.txt");
break;
case "forums"
include ("forums.txt");
break;
case "contact"
include ("contact.php");
break;
case "staff"
include ("staff.txt");
break;
case "links"
include ("links.txt");
break;
case "downloads":
include ("downloads.txt");
break;
case "projects":
include ("projects.txt");
break;
default:
include ("news.txt");
}
?>
But I keep getting this error whenever I excute it
Parse error: parse error, unexpected T_INCLUDE in /home/surrix/public_html/test.php on line 41
The code is supposed to be switching out the content that appares in one of the tables when a link is click on and the links would look something like this www.surrix.net/index.php?nav=forums or whatever but I can't get it to work what is wrong with it?
Comment