1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: PHP dynamic menus and passing variables

Discussion in 'Web Design & Development' started by Driller 59, Nov 23, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. Driller 59

    Driller 59 Thread Starter

    Joined:
    Oct 31, 2007
    Messages:
    29
    Alright so I'm new to php but not programming in general. I am trying to build a menu with sub-menus that display only on given pages. So my idea was to pass an integer from the calling page into the included menu page and from there through a series of if-elseif statements determine which menu to include from there. So far all I am able to do is include the main menu but on said pages the sub menus will not show due to the if ( $pge == 31 ); statement and I've tried it with quotes around the 31 with no change. Any help would be greatly appreciated the source code for the menu and calling page are attached.
     

    Attached Files:

    • code.7z
      File size:
      1.5 KB
      Views:
      58
  2. Driller 59

    Driller 59 Thread Starter

    Joined:
    Oct 31, 2007
    Messages:
    29
    Okay so I reworked the code and now everything works. If you would like to see the revamped code please feel free to PM me.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1028230