I have a pure content site which i have kept it purely static deliberately. However...whenever i want toc hange something sitewide, i will have to modify all the 500+ pages which is time consuming.
Is there was a to use PHP and Mysql and make it partially dynamic? I want the header and footer to be dynamic and the right hand column also to be dynamic.
What i really want to do is...whenever i want to modify the header/footer or right column..i make the changes in one place and a piece of php code inseted in all the templates will parse and display the actual content on all the pages when loaded.
Is it possible to do that? If so what is the best way to achieve that.
of course that's possible. probably the most important thing to be aware of:
to allow php code in a page to be parsed (carried out), the page needs to be recognised as a php page. this is normally achieved by naming it .php - however, i suspect in your case the endings are .htm. in order not to have to rename all your pages to .php and potentially lose all your SE rankings, you can set your server to "parse html pages as php pages" - search for that phrase in these forums and you'll find lots of info.
otherwise it is simply a matter of searching and replacing your header and footer html code with the appropriate php code. see this post for guidance: [webmasterworld.com...]
once you have started down this road, you will never look back ;)
Maybe I am over looking things but take a few minutes up front to use server side includes (SSI). The inital setup will be a pain to go through but once done it will help. Want to change the footer? Edit one file and your done.
All my pages are only a block of content. The header, footer, left ahnd side, and right hand side are all includes.
Jaime ... Thank you soo much for the inputs and the directions/pointers. they will be so very helpful. Yes I did think of the issue you emntioned that there should be no need to change the file extensions from .html to .php so that i do not lose the SE indexed pages. I will do the search and use the pointers you gave me.
Brian ... I always wanted to know more about possibly using SSI...can you give me some pointers available either within this forum or sticky me with some external pointers if they cannot be posted in the thread?
Another way to do the same which I utilize is to have all your page information and content in a database. I then use a php script and smarty templates (optional) to generate each page and the write to a file as .html
So, I manage all my data dynamically, but publish it static.