Problem with PHP Menu
Posted: Wed Sep 06, 2006 10:31 am
I am using variables to display the correct navigation menu on my site. Everything appears to be working fine, except for one section of the menu, and for the life of me I cannot see what I am doing wrong.
At the top of each page, I define a variable: "pageid" and assign a number to it: 01-09.
The navigation menu is an include file with 9 items, listed below is the code for 8 and 9.
The problem that I am having is that when the pageid variable is set to 08 or 09, it triggers the first "echo" for both items.
The web address is http://www.flatwatershakespeare.org/new/default.php
Thanks in advance for any help...
At the top of each page, I define a variable: "pageid" and assign a number to it: 01-09.
Code: Select all
<?php
$pageid = 08;
?>Code: Select all
<?php
if ( $pageid == 08 ) {
echo "<img src=\"images/menu_08_on.gif\" name=\"menu08\" width=\"173\" height=\"18\" alt=\"Getting Involved\" border=0><br>";
} else {
echo "<A HREF=\"getting_involved.php\" onMouseover=\"menu08.src='images/menu_08_on.gif'\" onMouseout=\"menu08.src='images/menu_08_off.gif'\"><img src=\"images/menu_08_off.gif\" name=\"menu08\" width=\"173\" height=\"18\" alt=\"Getting Involved\" border=0></a><br>";
}
if ( $pageid == 09 ) {
echo "<img src=\"images/menu_09_on.gif\" name=\"menu09\" width=\"173\" height=\"18\" alt=\"Home\" border=0><br>";
} else {
echo "<A HREF=\"default.php\" onMouseover=\"menu09.src='images/menu_09_on.gif'\" onMouseout=\"menu09.src='images/menu_09_off.gif'\"><img src=\"images/menu_09_off.gif\" name=\"menu09\" width=\"173\" height=\"18\" alt=\"Home\" border=0></a><br>";
}
?>The web address is http://www.flatwatershakespeare.org/new/default.php
Thanks in advance for any help...