![](http://headlineslist.com/images/banner.gif)
How do I change website content without touching every page?
|
01-16-2013, 09:44 AM
Post: #3
|
|||
|
|||
Try the PHP function include().
Your site should look like this: File index.php <html> <body> <div id="header"></div> <div id="navigation"></div> <div id="content"> <?php $site = $_GET["site"]; include('homepage/'.$site.'.php'); ?> </div> </body> And your links should look like this: <div id="navigation"> <a href="homepage/index.php?site=home"></a> <a href="homepage/index.php?site=about"></a> </div> Now create the files: homepage/home.php with your content in it. The link will now tell the file index.php which site to load, and index.php will simply insert the content of the included file. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
How do I change website content without touching every page? - Sean - 01-16-2013, 09:25 AM
[] - Erraticspark576 - 01-16-2013, 09:35 AM
[] - Joe - 01-16-2013 09:44 AM
|
User(s) browsing this thread: 3 Guest(s)