Temper
02-24-2003, 10:57 PM
I've forgotten how to make links that use a page and then include information. Ok, so that wasn't clear at all, I'll try to explain:
Say I have a a page (index.php) and I want to keep the index layout on all my pages, so I have a link set up that will display the content wherever I want it on the page. When the link is placed, the adress will look like "index.php?inc=content". Once it hits that link, the layout will stay the same, but the content will change. I've done this before a long time ago, and since then I've deleted my examples. All I remember is that it involved this piece of code:
<?php
include($_GET['content'] . '.php');
?>
I'm not sure if to some people it seems really obvious, but I'm not strong in php, and this may be all of the code I need, but I don't know how to use it properly.
Any help would be nice.
~Mike
Say I have a a page (index.php) and I want to keep the index layout on all my pages, so I have a link set up that will display the content wherever I want it on the page. When the link is placed, the adress will look like "index.php?inc=content". Once it hits that link, the layout will stay the same, but the content will change. I've done this before a long time ago, and since then I've deleted my examples. All I remember is that it involved this piece of code:
<?php
include($_GET['content'] . '.php');
?>
I'm not sure if to some people it seems really obvious, but I'm not strong in php, and this may be all of the code I need, but I don't know how to use it properly.
Any help would be nice.
~Mike