Hello Everyone,
I'm trying to change the page content based on which link is pressed. Can someone tell em hwy my code doesn't work, please? Last error I got was a parse error on line 43. Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PHP content Change </title>
<style type="text/css">
li {
list-style-type: none;
display: inline;
margin-right: 15px;
}
</style>
</head>
<body>
<img src="http://www.grass-rootsfoundation.org/images/grass4_r1_c1.jpg" width="980" height="114" />
<h1>ABOUT US</h1>
<ul>
<li><a href="contentchange.php?link=1">President</a></li>
<li><a href="contentchange.php?link=2">Staff</a></li>
<li><a href="contentchange.php?link=3">Board of Directors</a></li>
</ul>
<?php
if (isset($_REQUEST['link'])) {
$link = $_REQUEST['link'];}
else {$link = 1;}
switch ($link) {
case 1:
include ("aboutroots.html");
break;
case 2:
include ("rootsstaff.html");
break;
case 3:
include ("rootsdirectors.html");
break;
default:
$link = 1;
break;
?>
</body>
</html>