Hjælp til menu...
Jeg har et problem med en menu i PHP(Jeg troede jeg var smart og lukkede et andet spm og gav mig selv point'sne men det virkede ikke alligevel :( )
Problemet er: fx. hvis jeg har siden i index.php på www.gate2game.dk, så ser mit link i menuen således ud:
www.gate2game.dk/index.php?submenu=main (fx.)
jeg vil gerne have det til at se sådan ud: www.gate2game.dk/index.php?submenu=main&id=main.html (hvis mainfilen skal vise hen i "ID" altså den tabel jeg har i index.php)
Her er menuen..
-------------------------------------------
<?
$menu_items = array(
"Home"=>array(
"Home"=> "menusystem.php3",
"About"=> "about.php3",
"Contact Us"=> "contact.php3"
),
"Jimmy_Buffett"=>array(
"Jimmy Buffett"=> "menusystem.php3",
"Memorabilia"=> "memorabilia.wphp",
"Hawaiian Shirts"=> "h-shirts.wphp",
"Themed Shirts"=> "t-shirts.wphp",
"Beach Towels"=> "towels.wphp",
"Parrotphernalia"=> "parrotphernalia.wphp",
"Discography"=> "discography.php3"
),
"Island_Wear"=>array(
"Island Wear"=> "menusystem.php3",
"Hawaiian Shirts"=> "h-shirts.wphp",
"Island Dresses"=> "dresses.wphp",
"Shorts"=> "shorts.wphp",
"T-shirts"=> "t-shirts.php",
"Beach Towels"=> "towels.wphp",
"Sandals"=> "sandals.wphp",
"Key West Aloe"=> "kwaloe.wphp"
),
"Caribbean Soul"=>array(
"Caribbean Soul"=> "menusystem.php3",
"T-shirts"=> "t-shirts.wphp",
"Beach Towels"=> "towels.wphp",
"Other"=> "csoul.wphp"
),
"Sunken Treasure"=>array(
"Sunken Treasure"=> "menusystem.php3",
"About Cobs"=> "cobinfo.php3",
"Specials"=> "specials.wphp",
"Custom Order"=> "custom.wphp",
"Replicas"=> "replicas.wphp"
)
);
for(reset($menu_items); $sub_menu=key($menu_items); next($menu_items)) {
print ( "<FONT face=arial color=blue size=\"3\"><B>");
print ( "<A
HREF=\"".$menu_items[$sub_menu][$sub_menu]. "?submenu=".$sub_menu. "\">");
print (key($menu_items[$sub_menu]). "</A><BR>");
if ($submenu==$sub_menu) {
for(reset($menu_items[$sub_menu]); $menu_item =
key($menu_items[$sub_menu]); next($menu_items[$sub_menu])) {
print ( "<FONT face=arial color=blue size=\"2\"><B>");
print ( " <A
HREF=\"".$menu_items[$sub_menu][$menu_item]. "?submenu=".$sub_menu. "\">");
print (key($menu_items[$sub_menu]). "</A><BR>");
print ( "</FONT>");
}
print( "</B></FONT>");
}
print( "<BR>");
}
?>
-------------------------
Jeg håber i kan hjælpe mig...