Jump to content

Recommended Posts

As the subject says the sub menus won't display. Everything else displays but the sub menus. Can someone please help me display the sub menus? Thanks in advance.

 

Here is my code:

// display the buttons with menus
$query6 = mysql_query("SELECT menuname, pagetitle FROM menu WHERE menuname = 'Menu'") or die ("Could not query because: ".mysql_error());
while ($row6 = mysql_fetch_array($query6)) {
	$pagetitle1 = str_replace('%20', '', $row6['pagetitle']);
	$pagetitle2 = strtolower($pagetitle1);
	$pagetitle3 = stripslashes($pagetitle2);
	$pagetitle4 = str_replace('%20', ' ', $row6['pagetitle']);
	echo "<img name=\"".$pagetitle3."btn\" src=\"http://www.blueguminteractive.biz/bdgp/admin/images/".$pagetitle3."btn.jpeg\" width=\"110\" height=\"23\" border=\"0\" id=\"".$pagetitle3."btn\" usemap=#m_".$pagetitle3."btn alt=".$pagetitle4." />\n";
	echo "<map name=\"m_".$pagetitle3."btn\" id=\"m_".$pagetitle3."btn\">\n";
	echo "<area shape=\"rect\" coords=\"0,0,110,23\" href=\"page.php?page=".$row6['pagetitle']."\" alt=\"".$pagetitle3."\" onmouseout=\"MM_menuStartTimeout(1000);\" onmouseover=\"MM_menuShowMenu('MMMenuContainer0926100036_0', 'MMMenu0926100036_0',0,23,'".$pagetitle3."btn');\" />\n";
	echo "</map>\n";

	// display the menus
	$query06 = mysql_query("SELECT * FROM menu WHERE menu = 'Yes'") or die ("Could not query because: ".mysql_error());
	while ($row06 = mysql_fetch_array($query06)) {
		$pagetitle01 = str_replace('%20', '', $row06['pagetitle']);
		$pagetitle02 = strtolower($pagetitle01);
		$pagetitle03 = stripslashes($pagetitle02);
		$pagetitle04 = str_replace('%20', ' ', $row06['pagetitle']);
		echo "<div id=\"MMMenuContainer0926100036_0\">\n";
		echo "<div id=\"MMMenu0926100036_0\" onmouseout=\"MM_menuStartTimeout(1000);\" onmouseover=\"MM_menuResetTimeout();\">\n";
		echo "<a href=page.php?page=".$row06['pagetitle']." id=MMMenu0926100036_0_Item_1 class=MMMIFVStyleMMMenu0926100036_0 onmouseover=MM_menuOverMenuItem('MMMenu0926100036_0');>\n";
		echo $row06['pagetitle']."\n";
		echo "</a>\n";
		echo "<a href=page.php?page=".$row06['pagetitle']." id=MMMenu0926100036_0_Item_1 class=MMMIVStyleMMMenu0926100036_0 onmouseover=MM_menuOverMenuItem('MMMenu0926100036_0','1);>\n";
		echo "<span class=MMMenuItemSpanMMMenu0926100036_0>".$row06['pagetitle']."</span>\n";
		echo "<img src=\"arrows.gif\" class=\"MMArrowStyleMMMenu0926100036_0\" border=\"0\" />\n";
		echo "</a>\n";
		echo "</div>\n";	

		// display the sub menus
		$query07 = mysql_query("SELECT * FROM menu WHERE submenu = 'Yes'") or die ("Could not query because: ".mysql_error());
		while ($row07 = mysql_fetch_array($query07)) {
			$pagetitle05 = str_replace('%20', '', $row07['pagetitle']);
			$pagetitle06 = strtolower($pagetitle05);
			$pagetitle07 = stripslashes($pagetitle06);
			$pagetitle08 = str_replace('%20', ' ', $row07['pagetitle']);
			echo "<div id=MMMenu0926100036_0_1 onmouseout=\"MM_menuStartTimeout(1000);\" onmouseover=\"MM_menuResetTimeout();\">\n";			
			echo "<a href=page.php?page=".$row07['pagetitle']." id=MMMenu0926100036_0_1_Item_0 class=MMMIFVStyleMMMenu0926100036_0_1 onmouseover=MM_menuOverMenuItem('MMMenu0926100036_0_1');>\n";
			echo $row07['pagetitle']."\n";
			echo "</a>\n";
			echo "</div>\n";
		}
	}
	echo "</div>\n";
	echo "</div>\n";
}

 

My table structure is:

Menu

menuid // the autoincremented primary key

menu // Yes or No

menuname // Alone, Menu or page title

pagetitle // just the title of the pages

submenu // Yes or No

submenuname // none or page title

Link to comment
https://forums.phpfreaks.com/topic/70838-sub-menus-wont-display/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.