0

I am creating a new page and have developed a header which includes a logo on the left, a div on the right which contains a username and password label and input, and a login button: Under that is a div which is empty except for a border giving it a line. Under that is a 1 row, 5 column table with the menu.

I would like for that to be on every page that I write, but centralized so that any changes that I make only need to be changed in one place. I think it is possible in php, but I don't know how to write php. Is there a way to do it in html?

Thanks

  • possible duplicate of [Make header and footer files to be included in multiple html pages](http://stackoverflow.com/questions/18712338/make-header-and-footer-files-to-be-included-in-multiple-html-pages) – m4n0 Jul 03 '15 at 16:53
  • You are correct. I had not seen that one. It had some useful information on it though the simplicity of the response from you below was more concise and simple. Thank you for sharing it. – David Brabson Jul 09 '15 at 14:57

1 Answers1

1

If you need to do it using PHP, you need to create the code in separate files. header.html and footer.html

Use this below code in filename.php

<?php include('header.html'); ?>

/* Rest of the body content */

<?php include('footer.html'); ?>
m4n0
  • 25,434
  • 12
  • 57
  • 77