Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

Menu with require('.php') file

General discussions related to php

Moderators: macek, egami, gesf

Menu with require('.php') file

Postby RockOfVictory » Wed Apr 16, 2003 11:18 am

I am very new to php. I would like to create several php files that I can use for the menus at the top and bottom of each page of my website. http://zepfanman.com/ledlyrso.html is one of these pages where you can see how I have it set up. What would be a fairly simply way to create a separate file that all my Zeppelin pages could "require"? This way, I could change the separate file if I have a new menu item and I wouldn't have to change every menu in each Zeppelin page. The tricky part is that I want the current page to NOT show up as a link (at the bottom of the page) and to be in the title bar on the top instead of with the other menu items - would I use some sort of IF statement? Let me know if you need further clarification. Thanks in advance!
RockOfVictory
New php-forum User
New php-forum User
 
Posts: 5
Joined: Thu Feb 27, 2003 2:25 pm
Location: Nashville, TN

Postby bezmond » Wed Apr 16, 2003 11:44 am

use
Code: Select all
include("page");


Andrew
User avatar
bezmond
Moderator
Moderator
 
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK

Postby RockOfVictory » Wed Apr 16, 2003 11:52 am

I understand how includes and requires work. I am asking how I should set up this dynamic menu - how I should set up the variables, etc.
RockOfVictory
New php-forum User
New php-forum User
 
Posts: 5
Joined: Thu Feb 27, 2003 2:25 pm
Location: Nashville, TN

Postby bezmond » Wed Apr 16, 2003 12:20 pm

ah sorry, I mis-understood your query...

Andrew
User avatar
bezmond
Moderator
Moderator
 
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK


Return to PHP General

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.