Making a simple PHP include website need not, in principle, need not hurt your brain!
So… Let’s make an easy-to-maintain bespoke brochure website using PHP. This post covers the principles of using PHP and how it can be used for brochure websites, also known as ‘brochureware’. This is not a whole guide to making a website, only the PHP part.

Maintaining a large bespoke brochure website can be very time-consuming, based on my past experience. Using PHP “include” can take the website to the next stage of modular design and streamline your workload.
Imagine writing one line of code into a ‘php’ file instead of copying and pasting the same piece of code across 70 or so pages? Now that is time-saving.
Now imagine if you had to manually edit and retype code across all 70 pages due to a typo! You would have to go back and amend all of the pages one by one, and it would be a costly waste of time! And you’d get an arm ache!
This is especially useful on navbars and footers. Using PHP include can reduce the time-consuming method of copy and paste, shorten time, and take your website to the next stage of development (Or look at a CMS system, but that is a different topic).
With using the ‘php Include’ – the information you amend in one file can change across multiple webpages with a simple save and upload.
To further illustrate this, you can use this method for navigation, footers, banner adverts, and much more. I cannot emphasise how much easier this will make your life when working on larger projects if you must take the bespoke method. Change once to update many!
It will save hours!
Or as I said before, just use a CMS system.

The Principle Of Using PHP INCLUDE for Navigation and Footers
In short, with PHP Include, you can use this line of code to include things into a web page. For example, you may wish to add custom navigation, a footer, a banner advert or just something that you wish to include. It pulls in external files and components.
For example, on a master page – parent page or however you wish to address a main page, by adding a line of script into a ‘div’ or area of your page, you can pull in files such as a navigation if it were to be created in a separate file. Such as a separate nav bar.
Likewise, this principle and line of code can pull in footer data. Or anything of similar nature.
You need not copy and paste the navigation again and again. It has many uses and purposes.
<?php include ‘a-cool-file.php’;?>
More on this can be read here on W3C schools. ( 3rd part website )
Part 1: Getting started with ‘PHP include’
Steps for making a bespoke, low-maintenance brochure website using PHP include: the first block.
As a basic example, we are going to make a footer. We will have a master or ‘main’ document that will “include” – pull in, integrate, import a file from your website. This file will be a footer.
This tutorial/experiment will assume you already have prior knowledge of setting your website up with root folders etc, if you need some more help with this, please follow these tutorials.
https://helpx.adobe.com/dreamweaver/how-to/first-website-part1.html
Or PHP
http://php.net/manual/en/tutorial.php
You Will Need:
– The main file (The parent/master)
– An external footer file (why not add some styling to your html?)
– One line of code, which you will embed into the parent folder.
– A space to upload/test your experiment. (domain and hosting)
Component 1 – Parent File (Master)
The ‘Parent’ (master) will pull in the external files to construct the page. In this example. The master will have some code at the bottom of the page that will say ‘Hey footer, you included down here’.
Why not call your parent file ‘master.php’
This image shows (with straying CSS, bleurgh! sorry, an old image ) the master.php and Product-footer-test.html working together… or popping out of the bottom.

Component 2 – Footer File
I have used the footer in the example. This area of the website at my previous company used to have frequent updates, with new products being added constantly. As you can see, all styling is added to this queasy example with the accursed table by using CSS – the image below is the bare bones of the footer file – no bells, no whistles! ( Why did I use the horrible table back in the day!
If completed correctly, changes or modifications to the footer file will be included in the master file once you add the “include” piece of code to the master file. So what you change here (the footer file) will be visible once you come to uploading all of the files and testing the file.
How you treat your footer is down to you.
The Code Example – The Simple Piece of Code to Paste Into Your Master PHP file
The image below shows in red where the piece of “include” code sits. So, imagine you have made a hollow space on your webpage, in the hollow space, you are going to add this code to the bottom. As shown.

Product-footer-test.html”); ?>
The line of code above, which has been inserted into the bottom of your master file will call on the footer module and all of its elements. Once you upload your files you can see whether the footer has worked! Oh and check you have saved everything!
The visual diagram below will visually show how the principle works – leaving aside how the coding works for the PHP include.
Summary of PHP include in action

In a nutshell. You have the parent (the main page) and a child, in this example, it was the footer. 2 elements talking to each other. Thank you for reading.
Hey, need a hand with your website?
There are other methods to get the results you want, which may be even more effective if you are a non-coder. You can use a web builder, a CMS or something else. If you would like help you can find out more on the design website.
If you need a hand with a blog or website, please get in touch.

You may also find these posts interesting :
Making a simple PHP include website : Website Posts
- Re-Designing the Living Centre – Case Study
- Wimbledon Brewery – UI design
- Designing a story game in Adobe Animate
- My Design Process in steps
