View Full Version : Updating Content Across A Site Using One Seprate Page?
skaterkee
Apr 6th 2008, 10:21 am
Hi, I'm wondering how I would go about updating multiple pages using just one. You see I have a content column that I need to update across the site every few days but don't want to edit tonnes of pages each time.
I assume there's a way using PHP to put a code in each page that updates automatically when the code's page is updated?
E.g
a) php file with changing content
b) regular page with php code
when a is updated so is B
Colbyt
Apr 6th 2008, 11:15 am
Using php one time you go through each page manually and add <?php include("update.php" ; ?> where you want the content to appear.
Then whatever you place in the file update.php will show on all the pages that have the include. Note that if the update file is not in the same directory will need to include the path to the file.
skaterkee
Apr 6th 2008, 11:53 am
Great - thanks mate.
skaterkee
Apr 6th 2008, 1:17 pm
Just an update for anyone who needs the same information and might read this topic I had to edit
<?php include("update.php" ; ?>
to
<?php include("update.php"); ?>
Colbyt
Apr 6th 2008, 1:31 pm
Just an update for anyone who needs the same information and might read this topic I had to edit
<?php include("update.php" ; ?>
to
<?php include("update.php"); ?>
Nice catch! That was a typo.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.