Hello everyone, I hope all is well and as per protocol thank-you in advance for any help/suggestions. My question this time is about making my baseball web site utilize includes for header, main and footer pages. Does anyone know of any good tutorials. I see some sites keep the <head> <title> and <body> tags in the header file and some don't. They use the ob_start() function. Not sure as to whicj one is better. I have read some sites use the GET function although I have read that this can sometimes cause problems with forms on a page(true?). Anyway thank-you for any help.
CHEERS
header/footer includes
Moderator: General Moderators
Re: header/footer includes
You will need to create your header file and a footer file. Then, it is as simple as this:
You then save that file as index.php and visit it in your browser. You'll then see your header, the page contents, and the footer.
This is how I do a lot of my sites, but a lot of people prefer a single point of access such as index.php?page=pagename.
That preference is up to you.
Did that help answer what you asked?
Code: Select all
//header file
require 'header.php';
echo 'Hi, im the index.php file!';
//footer file
require 'footer.php';This is how I do a lot of my sites, but a lot of people prefer a single point of access such as index.php?page=pagename.
That preference is up to you.
Did that help answer what you asked?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.