FAQ |
Kalender |
|
2008-07-12, 15:15 | #1 | ||
|
|||
Medlem
|
Har en kanon meny som jag vill använda men får inte till det riktigt..
Jag har en index.php som hämtar menu.php där den skall vara. Se sidan: http://jbnx.org/medialt/ Menyn på den sidan är menu.php --> KOD: <?php include ("config.php"); $connection=mysql_connect($dbserver,$dbuser,$dbpas s) 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 "<a href=\"index.php?show=",$row->ID,"&",$row->LINK,"\">",$row->NAME,"</a> - "; } echo " "; $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 " "; $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> - "; } } ?> menyerna finns i 3 nivåer - Huvudmeny -> Undermeny -> Under Undermeny Jag vill att undermenyn skall vara "fast" och inte försvinna när man klickat på ett val på den.. Hur kan man göra ? |
||
Svara med citat |
Svara |
|
|