Design a Website class 8

esse quam videri
Jump to: navigation, search


Ok, so there's a new requirement for project 2. Don't worry, it's not hard.

First! Don't just write over what you turned in for project 1. Keep project one, just like it was when you turned it in, and leave it in the project 1 folder. Make copy of all your files, and put them in your project 2 folder. Edit those files for project to, so I can jump back and forth between both pages and compare them.

Included with your project 2 folder I want a text file, or a word doc, or a light weight website that has a list of 4 meaningful improvements you made to project one. "I changed a color of my background so it looks cooler now," is not meaningful. "I used a php include to put my navigation on every page of the site so it's easier to use," or "I change the color of my background image so it's easier to read the text on top of it." are meaningful changes.

php and php includes

php is a server side language that can be used to add dynamic content to your web pages. php is a web programming language, meaning it uses math and logic to generate different html for different users based on their actions. You can use php to make systems where users can add content to your page right through their browser, like a comment system on a blog.

One thing I wish html had was include files, so I could write my navigation once, and include it on every page. One line of php code can add this functionality to our websites.

First off you need to change your file extension from .html to .php.


Then you will start a block for php code in your html page, where you want the include to show up. If you want your include file to be a header, it should be the first thing in your php page. If you want to incude the navigation, it will go where ever your navigation would have been if you weren't using php.


To include a file called "pleaseInclude.html" I would use this line of php code

include 'pleaseInclude.html';

Then to end the block of php code I would need to add


So the whole thing would look like

include 'pleaseInclude.html';

php resources on the web


  • Keep working on project 2. It's due in one week.
  • make sure your Design a Website Assignments are up to date
  • if you have a copywright free video file or mp3 you'd like to put on the web, bring it for Tuesday.