Menu Items - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Menu Items

munky344munky344 Posts: 12Member
Hi there

I have this very simple menu item , but I am not sure how to connect a from to my menu items , i.e. I need my search.php form to open once the user clicks on the search menu item. Please can someone take a look.

Thanking you in advance. Regards.


<?php require_once("menuHandler.php"); ?>

MicroMetaSpider - Check website META information

Medex Information System

This is a Medex Index Page!

2008 - Medex Information Systems


// Main menu items
$mainMenu['Help'] = 'link-1';
$mainMenu['Admin Functions'] = 'link-2';
$mainMenu['Modules'] = 'link-3';
$mainMenu['Support'] = 'link-4';
$mainMenu['Others'] = 'link-5';

// Sub menu items
$subMenu['Modules']['Patient Demographics'] = 'sub-link-1';
$subMenu['Modules']['Search'] = 'sub-link-2';
$subMenu['Modules']['Visits'] = 'sub-link-3';
$subMenu['Modules']['Reports'] = 'sub-link-4';

$subMenu['Others']['SubMenu-1'] = 'sub-link-11';
$subMenu['Others']['SubMenu-2'] = 'sub-link-12';
$subMenu['Others']['SubMenu-3'] = 'sub-link-13';


function createMenu($actLink){

echo '<table class="menutable">';

// Get actual Main menu
foreach ($mainMenu as $menu => $link) {
if ($link == $actLink) $actMenu = $menu;
if (isset($subMenu[$menu])){
foreach ($subMenu[$menu] as $menuSub => $linkSub) {
if ($linkSub == $actLink) $actMenu = $menu;

foreach ($mainMenu as $menu => $link) {
echo ''.$menu.'';
if ( ($actMenu == $menu) && (isset($subMenu[$menu])) ){
foreach ($subMenu[$menu] as $menuSub => $linkSub) {
echo ''.$menuSub.'';

echo "";
Sign In or Register to comment.