"Brandon Feldhahn" <[EMAIL PROTECTED]> wrote:
> Im making a website and i want the viewer to know were he of she is,
> what do i need to do to make a location bar (home > serverices ect...)
> with the $PHP_SELF command, i wasent able to figure it out so i am
> asking assistance from another person.

A simple solution for a site with a small number of pages would be to create
an array like the following:

$location['/index.php'] = "Home";
$location['/services.php'] = "Services";
$location['/products.php'] = "Products";

Then use $SCRIPT_URL or a similar environment variable to display the proper
label in the "location bar".

<?php echo $location[$SCRIPT_URL]; ?>

If you have a large number of pages (especially dynamically generated
"virtual" pages) or sublevels to your site you'll probably want to use a
more advanced solution.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to