I have a website with a large amount of dynamic content. I have a main template page that then loads the content into it. I have SSI running fine (including to php files) but I cannot get the php files to see the url parameters from the html page. I would rather not convert all my html files to php files if I can help it.
The following code gets to the php file ok (ie displays hello world.) but what do I put for the ???? to get the topic passed from the html url to the included php file?
Ive tried $_GET which works if I call the page directly (ie place getDynamicContent.php?topic=X in the browser) but not when called through #include.
.
for a url: mainPage.shtml?topic=X
.
in mainPage.shtml
//this includes fine - no problems
<!--#include "commonHeaderStuff.html"-->
//this includes but does not parse variable
<!--#include "getDynamicContent.php"-->
.
in getDynamicContent.php
//get topic variable
$topic=????
//return content based on $topic
echo "hello world";
if($topic=="X"){echo "You passes an X"}
else {echo "You passes a Y";}