Dynamic Drop Down List.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
steveonly20
Forum Newbie
Posts: 1
Joined: Fri Jun 20, 2008 4:00 am

Dynamic Drop Down List.

Post by steveonly20 »

Hi everyone, this is my first post so please go easy on me!

I am quite new to PHP but on each page I plan to have a options list to different pages. The problem I have is that when the pages are placed in there respective folders the links do not work. If i kept all the pages in one folder it is fine but administering this would become a little messy.

For example the site is:

1st page, http://www.xyz.com/news/index.php
2nd page, http://www.xyz.com/members/index.php

Is there anyway I can find and extract the location, e.g http://www.xyz.com and build from there.

Cheers in advance,
Stevo.
User avatar
highjo
Forum Contributor
Posts: 118
Joined: Tue Oct 24, 2006 1:07 pm

Re: Dynamic Drop Down List.

Post by highjo »

ca you post your codes here?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: Dynamic Drop Down List.

Post by Kieran Huggins »

navigation is usually best served as a list (<ul>) IMO.

Take a look at the $_SERVER array, you should find everything you need right there.
Post Reply