FAQ |
Kalender |
![]() |
#1 | ||
|
|||
Medlem
|
Har en kanon meny som jag vill använda men får inte till det riktigt..
1. När man klickar på ett menyval - flyttas den längst bak. - Det skall den inte göra.. 2. När man har klickat upp en undermeny skall den inte försvinna när man klickar på ett undermeny(sub) val (om inte sub2 kommer).. Borde inte vara så svårt för en skicklig programmerare - 1 timme ? Vem skulle kunna ta sig an det ? maila [email protected] ---------------------------------------------------------------------------------------------- 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,$dbpass); mysql_select_db($db); 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> - "; } } ?> |
||
![]() |
![]() |
|
|