Eli, the Computer Guy

PHP Programming Part One: Intro to PHP Programming

1. How does Eli describe PHP?

He describes it as an open source that is very useful for the IT department.

2. Briefly compare and contrast scripted and compiled languages.

Scripted languages use text files that are open to editing, while a compiled language outputs an executable file that is immune to editing when the code is compiled.

3.Briefly explain the difference between client side and server side scripting.

A server side language is invisible to anyone attempting to inspect your code, while a client side language is visible to anyone inspecting it.

4.What popular website does Eli cite as an example of what you can do with PHP and MySQL? Why did Eli that that this particular site was a good example?

Eli sites Craigslist. The website is a great example due to the fact how widely used it is, and how easy it makes shopping for things online. The fact that something so complicated in nature can be built with PHP serves to portray the significance of the language.

5.What does Eli emphasize as the nice thing about scripted languages such as PHP?

He emphasizes how the language only returns the information that is required by the user, and nothing extra.

6.What is notepad++? Why would Eli recommend notepad++?

It is a notepad with extra features that are useful for programming and make your code structured. He recommends it due to the fact that it allows you to become a better programmer. Notepad++ does not give you compiler errors, and it is up to you to have perfect syntax.

7.If you want to write and run PHP code, what do you need?

All you need is a text editor and a web server that has a PHP interpreter installed.

8.How does Eli describe syntax?

He describes it as the punctuation and spelling for the code. It holds high significance due to the fact that even a tiny mistake, such as the misplacement of a period or semicolon can disrupt your code.

< Notepad++ Example

PHP Programming Part Two: PHP Syntax and Errors

1.In a Linux context, does capitalization matter?

Yes, it does due to the fact that Linux is case sensitive.

2.What are the basic attributes of PHP syntax?

They are opening quotation marks that allow code to be printed.

3.Discuss one of the PHP error handling techniques that Eli presents.

One technique that he mentioned was getting an error provided on the line before the line of error and after it.

4.What is the difference between printing text and printing HTML?

Printing text in PHP is done without inserting a new line, while it is the opposite in HTML.

5.What happens if you add a PHP script to a HTML page and you don’t change the file type to .php from .html?

The PHP commands are not printed properly. In order to have them printed, is it necessary to change the file to .php.

PHP Programming Part 3: Comments and INCLUDE in PHP Programming

1.What are the three ways that you can make comments in PHP?

You have your single line comments, which can be made by "//" or "#". Then you have your multi-line comment, which is made with "/**/".

2.What is the PHP include function? Why is it useful?

It is a function that allows you to include files in your code. It is useful because it reduces the amount of coding you need to do and helps perform specific tasks, such as opening up a file, or editing it.

webpage

PHP Programming Part 4: Variables in Print in PHP Programming

1.What are the three types of PHP variables that Eli discusses?

Eli discusses Strings, Arrays, and Integers.

2.What naming rules apply to PHP variables?

The variables are case sensitive, and must have a $ sign before them.

3.Compare and contrast the br tag in HTML and the \n in PHP.

In HTML, the br tag is visible and can be seen by the client, whereas the /n tag in PHP is invisible to the client, and is a line break which is only visible in the actual code.



PHP Programming Part 5: HTML Forms and PHP Programming

1.What does it mean when Eli says that HTML creates static pages while PHP creates dynamic pages?

He means that HTML pages are not subject to change due to the fact that they are static, while PHP pages can change based on user input.

In this exercise, you will use an HTML Textbox, an Option Box, and a Radio Button. What function does each of these input methods provide?

An HTML textbox is where a user can enter code. The option box gives the user multiple options to select, while a radio button limits the user to only one of a predefined set of actions.



< Return to Learning Portfolio
< Return to Mod Two