Now, wouldn't you want to know how to do it the short and simple way? If you do, here's a tutorial on how to do it. Mind you that this tutorial will only provide the basic of PHP includes usage.
First of all, take a look at this basic HTML coding. Let's say it is the coding for owner.html:
To use PHP includes, basically, you will need to split your HTML codes and put them in separate pages and then join them together with this code:
Step 1:
Open up your text editor and put in your html codes. Remember to paste only the codes that start from <HTML> until <body>. The rest that comes in between the <body></body> tags is the content.
Save this file as header.php
Step 2:
Create a new file and name it footer.php. Paste the bottom part of the HTML into this file:
Step 3:
Paste the contents of your page into a new file and name it owner.php.
Step 4:
Now, it is time to connect the 3 files together.
In the owner.php, paste this code at the very top of the file.
And at the very bottom of the file, paste this code:
Once you have coded that page. Upload the three files to your site and test it out. Go tohttp://yoursite.com/owner.php and see if it works.
Note: Make sure you place the header.php and footer.php in the same folder as the page that you want to connect them to otherwise it will not work.
Note: Make sure you place the header.php and footer.php in the same folder as the page that you want to connect them to otherwise it will not work.