Hello.
I'm trying to learn a bit of php and am using php includes on my site.
What I want to do is have a variable called page that will be pulled into the body section of the page. There will also be a php menu file included, that will reasign pages of content to the page variable when the links are activated.
I understand you can set a variable in the URL string. SO in the case where the first page of content that I want to be shown on my site is called. home.php. I'd have an url like
www.mysite.com/index.php?page=home
How will a visitor get to that URL to set the page variable, in the first place? Do I just create the index.php file then have that point at another page, where the variables and template for the site are set up. SO the index.php file would just be something like.
<?
header("Location:http://www.mysite.com/template.php?page=home");
?>
And then aall the includes, menu etc, are set up in template.php.
Sorry for longwindedness. Have googled but am not finding anything directly rellavent.
I'm trying to learn a bit of php and am using php includes on my site.
What I want to do is have a variable called page that will be pulled into the body section of the page. There will also be a php menu file included, that will reasign pages of content to the page variable when the links are activated.
I understand you can set a variable in the URL string. SO in the case where the first page of content that I want to be shown on my site is called. home.php. I'd have an url like
www.mysite.com/index.php?page=home
How will a visitor get to that URL to set the page variable, in the first place? Do I just create the index.php file then have that point at another page, where the variables and template for the site are set up. SO the index.php file would just be something like.
<?
header("Location:http://www.mysite.com/template.php?page=home");
?>
And then aall the includes, menu etc, are set up in template.php.
Sorry for longwindedness. Have googled but am not finding anything directly rellavent.

