PHP Navigation


I am creating a website. The layout of my website is something like this:
header is on the top, sidebar and content area are in the middle and footer at the end.

Now, when I want my website to display pages in the content area when any link in the sidebar is or header is clicked. How can I do this using PHP?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I usually load a whole new page.

If you just split the site up in parts like a header, sidebar and footer, and then include them in the area they should be, then you only have a raw page file, with the other files included.

If you really wan't to only load the content area, you can insert an iframe in that area, set its name = iframe, and then user target=ifram in your links.
krutarth941Author Commented:
I don't want to use iframes.  The reason for that is it restricts search engine capability of the site. Is there any way to load only the content section in php?
Yes, if you use jQuery and Ajax. This video shows you how it works:
krutarth941Author Commented:
The link was helpful. Thank you very much!
Lukasz ChmielewskiCommented:
You can have index.php file with the code:

 // header menu
<a href="index.php?page=main">main</a>
<a href="index.php?page=somepage">somepage</a>

Open in new window

And two files: main.php and somepage.php, clicking the links includes the content

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.