Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Search Search
Search for:
Tech Support Guy > > >

Solved: PHP dynamic menus and passing variables


(!)

Driller 59's Avatar
Driller 59   (Josh) Driller 59 is offline
Computer Specs
Member with 29 posts.
THREAD STARTER
 
Join Date: Oct 2007
Location: Lethbridge, AB
Experience: Advanced
23-Nov-2011, 11:12 PM #1
Solved: PHP dynamic menus and passing variables
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
File Type: 7z code.7z (1.5 KB, 41 views)
Driller 59's Avatar
Driller 59   (Josh) Driller 59 is offline
Computer Specs
Member with 29 posts.
THREAD STARTER
 
Join Date: Oct 2007
Location: Lethbridge, AB
Experience: Advanced
24-Nov-2011, 03:32 AM #2
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

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
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.


Tags
dynamic menu, html, menu, php

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑