Posted: Fri May 06, 2005 10:11 am Post subject: PHP includes
Okay im redesigning my site and im using php now. On my index.php site i have my include for my fusion news script which i want to load when you go to index.php.
My question is, i have other links on my index.php page like about me, etc etc.
How do i link those links, so they load in place of my fusion news php include on my index.php?
Think I might be able to help yah.
Insert this code into your main page.
Code:
<?PHP
if(isset($_GET['page'])) #If the page is set it will load
include($_GET['page'].".php"); # the "page".php value into your
else # page.
include("news.php"); # Loads news.php as default
?>
To change pages you simply use the following code.
Code:
<a href="?page=twit">Twit</a>
This will for eg. load twit.php into your selected page.
Hope this helps Good Luck _________________ CM Stacker - ABIT Fatal1ty AN8 Sli - AMD64 3500+ - 1GB PC-3200 DUAL - eVGA GeForce7800GT - SB Fatal1ty - 2x200GB 1x250GB Segate.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum