I have a great menu but i´t doesn´t work as i want it to..
I´ve got a index.php that includes menu.php
Se my homepage:
http://jbnx.org/medialt/
menu.php -->
KOD:
PHP Code:
<?php
include ("config.php");
$connection=mysql_connect($dbserver,$dbuser,$dbpass) or die ("Die Verbindung zum MySQL-Datenbankserver ist fehlgeschlagen");
mysql_select_db($db) or die ("Die benötigte Datenbank konnte nicht gefunden werden");
echo "<a href=\"index.php?show=0\">",$home,"</a> - ";
if(empty($show))
{
$get_main=mysql_query ("SELECT * FROM $maintable ORDER BY ID");
while ($row=mysql_fetch_object($get_main))
{
echo "<a href=\"index.php?show=",$row->ID,"&",$row->LINK,"\">",$row->NAME,"</a> - ";
}
}
if (!empty($show))
{
$upper_main=mysql_query ("SELECT * FROM $maintable WHERE ID < $show ORDER BY ID");
while ($row=mysql_fetch_object($upper_main))
{
echo "<a href=\"index.php?show=",$row->ID,"&",$row->LINK,"\">",$row->NAME,"</a> - ";
}
$lower_main=mysql_query ("SELECT * FROM $maintable WHERE ID > $show ORDER BY ID");
while ($row=mysql_fetch_object($lower_main))
{
echo "<a href=\"index.php?show=",$row->ID,"&",$row->LINK,"\">",$row->NAME,"</a> - ";
}
$selected_main=mysql_query ("SELECT * FROM $maintable WHERE ID = '$show' ORDER BY ID");
while ($row=mysql_fetch_object($selected_main))
{
echo "<b><a href=\"index.php?show=",$row->ID,"&",$row->LINK,"\">",$row->NAME,"</a></b> - ";
}
echo "<p>";
$sub=mysql_query ("SELECT * FROM $subtable WHERE MAIN = '$show' ORDER BY MAIN");
while ($row=mysql_fetch_object($sub))
{
echo "<a href=\"index.php?show=",$row->ID,"&",$row->LINK,"\" target=\"_self\" style=\"font-size=8pt;\">",$row->NAME,"</a> - ";
}
echo "<p>";
$sub2=mysql_query ("SELECT * FROM $subtable2 WHERE MAIN = '$show' ORDER BY MAIN");
while ($row=mysql_fetch_object($sub2))
{
echo "<a href=\"index.php?show=",$row->ID,"&",$row->LINK,"\" target=\"_self\" style=\"font-size=8pt;\">",$row->NAME,"</a> - ";
}
}
?>
The menu`s are in i 3 levels - Topmenu -> submenu -> Sub submenu
I want the Submenu to stay and not go away when i click on a submenu.
How can I do that ?