0

Well I got a doubt..
I have been away the whole web development scene for about 1 year and a half
and I'm trying to finish some old projects but i don't remember anything.
I have this blog I coded myself with basic php knowledge
I have the index PHP file, the menu php file and several articles


What I'm trying to do is to find a way to change the div's content by clicking on a menu link

I'm trying to do this with PHP include so everything ramains the same except the file that is being included inside the div (a text file)

Thanks!

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by pritaeas
0

You'd need to let the menu pass a parameter to your php file, so it would know what file to include. Something like index.php?id=1 or index.php?file=filename.txt

0

You can use GET like Priteas say's it should be something like this:

if (isset($_GET['div']))
{
include .........
}
0

What if i wanted to the URL to change when the content changes like in WordPress (for SEO purposes) it seems wordpress uses htaccesss rewrite

Edited by terabyte: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.