Hello everyone, nice place you have here 
I have a small website for my business, right now it has 5 pages but I would like to get it up to 10. The most it will ever have is 15 or so. It is hosting on GoDaddy.
Every page has the same exact header, sidebar, and footer. Since it's a pain right now when I want to change something, it's only going to get harder when I have more pages.
I did some searching on the ways to have a single file for the header and another for the footer so that you only have to change it once. It seems as if doing it with PHP is the best way, but a lot of what I read was 1-3 years old. I am not sure if anything changed.
For example, one article said to use this:
Another article said to use this:
Does it matter? Will one be supported in more browsers?
A second question I had is about changing all my existing pages into .php. My website has already been index by many search engines. I read that I could keep the pages as .htm if I put this into an .htaccess file:
Is that true? Is there any disadvantage in doing this?
Or should I be looking to do this in a totally different method instead of PHP?
Thank you very much for your help.
I have a small website for my business, right now it has 5 pages but I would like to get it up to 10. The most it will ever have is 15 or so. It is hosting on GoDaddy.
Every page has the same exact header, sidebar, and footer. Since it's a pain right now when I want to change something, it's only going to get harder when I have more pages.
I did some searching on the ways to have a single file for the header and another for the footer so that you only have to change it once. It seems as if doing it with PHP is the best way, but a lot of what I read was 1-3 years old. I am not sure if anything changed.
For example, one article said to use this:
Code:
<?php include("header.php"); ?>
Another article said to use this:
Code:
<?php include 'header.php' ?>
Does it matter? Will one be supported in more browsers?
A second question I had is about changing all my existing pages into .php. My website has already been index by many search engines. I read that I could keep the pages as .htm if I put this into an .htaccess file:
Code:
AddType application/x-httpd-php .html .htm
Is that true? Is there any disadvantage in doing this?
Or should I be looking to do this in a totally different method instead of PHP?
Thank you very much for your help.