PHP where you are links help
Posted: Sat Jan 17, 2009 8:21 am
Hey, I use the php command on my website to get multiple pages out of one php file.
The code I am using is similar to this:
This is so I can just type the content of each page in page1.php page2.php and page3.php. But what I need help with is also adding in the header file where the user is on each page.
For example: Home > Products > Shoes > Nike etc...
How can I edit my script so that I can also change the menu on each page?
Thanks in advance.
The code I am using is similar to this:
Code: Select all
<?php
$cmd = $_GET['cmd'];
if ($cmd=="") { $cmd = "page1.php"; }
@include('header.php');
switch($cmd)
{
case "page1":
@include('page1.php');
break;
case "page2":
@include('page2.php');
break;
case "page3":
@include('page3.php');
break;
}
@include('footer.php');
?>
For example: Home > Products > Shoes > Nike etc...
How can I edit my script so that I can also change the menu on each page?
Thanks in advance.