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!

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

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

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.