Hello - I am new to these forums, but I could really use some help with this problem.
I have a menu that lists a bunch of items (unordered list). I need these items to appear (image and description) inside a specific div on my page, when they are chosen in the menu (clicked).
The main page code is this :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Page Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<script src="menu.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<div id="topBar">
<div class="innertext"><h1>Retail Display Fittings</h1>
<img src="images/header1.jpg" />
</div><!-- close innertext -->
</div><!-- close topBar -->
<div id="leftMenu">
<?php include_once "menu.php"; ?>
<script type="text/javascript">
initSlideDownMenu();
</script>
</div><!--close leftMenu -->
<div id="mainContent">
<div class="clear"></div>
<div id="interiorPages">
<img src="images/showroom1.jpg" />
<?php include_once "interior.php"; ?>
</div><!-- close interiorPages -->
<div class="clear"> </div>
</div><!-- close mainContent -->
<?php include_once "footer.php"; ?>
</div><!-- close container --> -->
</body>
</html>
The code for interior.php (line 34 above) is this:
if(isset($_GET['id']))
{$id=$_GET['id'];}
if(isset($_GET['product']))
{$product=$_GET['product'];}
if(($id == "slatwall") && ($product == "slatwall")) {
include_once("slatwallMainContent.php");
}
else if(($id == "slatwall") && ($product == "1205")) {
include_once("1205-plexi-swivel-shoe-displayer.php");
}
else if(($id == "slatwall") && ($product == "1213")) {
include_once("1213-plexi-shoe-shelf.php");
}
else if(($id == "slatwall") && ($product == "1214")) {
include_once("1214-plexi-shoe-shelf.php");
}
else if(($id == "slatwall") && ($product == "1215")) {
include_once("1215-slant-plexi-shoe-shelf.php");
}
else if(($id == "slatwall") && ($product == "2800")) {
include_once("2800-straight-out.php");
}
else if(($id == "slatwall") && ($product == "2802")) {
include_once("2802-waterfall.php");
}
else if(($id == "slatwall") && ($product == "2804")) {
include_once("2804-hangrail-bracket.php");
}
and so on…
the code for the individual interior pages , e.g. 2804-hangrail-bracket.php is what I want displayed in the div:
<p class="prod_img"><img src="../images/2804t.gif" /></p>
<div class="clear"> </div>
<h1 class="prod_name"> 2804 HANGRAIL BRACKET</h1>
<p class="prod_desc"> 1"&1 1/16"
round tubing or<br>
1 1/4" & 1 5/16" round tubing<br>
chrome only</p>
<div class="clear"> </div>
ALL the pages are saved as .php files.
I cannot get the content to show in the div - and I am not getting any error messages, just nothing happens. All the files are in the same folder. And if I right-click on the menu they will open in a new page or tab, but they do not show in the same page in the div when the menu is clicked.
I hope I have been clear - I am fairly new to PHP and I’m sure there is a silly error somewhere in the code but I can’t find it. I’ve been searching, reading tutorials and forums for over a week now, can’t solve this.
Thanks for any help,