mikeslife.info - I need ideas?
On the far right hand side, there is a "Whats New?" area.
This is on all pages but has to be manually changed each time; this is becoming a pain having to manually edit all pages just for a small update.
Can anyone reccommend what else to place here instead or some kind of Javascript Code which updates them all when i update the homepage part?
Regards,
Mike
greg posted this at 12:43 — 1st June 2009.
He has: 1,581 posts
Joined: Nov 2005
A PHP include would be ideal here. Include a file in that area on all pages and just update the one file when needed.
The include code wouldn't need to be changed as long as the included filename stayed the same.
<?php
//whats new area
include_once('whats_new.php');//can be a .txt, .html .. etc
?>
As you use HTML files, you will need to either change them to .PHP wherever you have the "What's New" OR put a re-write rule in the .htaccess file.
webwiz posted this at 18:13 — 1st June 2009.
He has: 629 posts
Joined: May 2007
Another method that I have used - Server Side Includes. It's very likely that these are available on your host - if not, ask them to allow them for you. Way simpler than PHP, too, IMHO.
Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.