PHP Programming Part 1: Introduction to PHP Programming
1. How does Eli describe PHP?
PHP is the programming language that makes a website useful. Allows user to interact with data and dynamically write webpages.
2. Briefly compare and contrast scripted and compiled languages.
Compiled languages use software that when the code is written, it outputs an executable file.
After that, the executable file cannot be edited. Scripted languages you upload a text file to a server and then the user can access the file and the software will then process the information and deliver it to the user. You can always use and read a text file where the PHP written at.
3. Briefly explain the difference between client side and server side scripting.
On server side scripting all the process is made at the web server and then output the HTML to the user. On client side the user access the server but all the information gets sent to the user’s computer, where all the passwords and info of all the users are.
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?
Craigslist.com. Craigslist is exceedingly powerful/effective but it’s not pretty.
5. What does Eli emphasize as the 'nice' thing about scripted languages such as PHP?
You’re always using the text file and you can always read the source file.
6. What is notepad++? Why would Eli recommend notepad++?
A text editor like notepad that contains a few additional features for writing code.
7. If you want to write and run PHP code, what do you need?
Notepad and a server that has PHP installed.
8. How does Eli describe syntax?
How you spell the commands you are using.

PHP Programming Part 2 : PHP Syntax and Errors
1. In a Linux context, does capitalization matter?
Yes it does. Most servers are linux web servers.
2. What are the basic attributes of PHP syntax?
Open PHP with <?php and close with ?>. Between the tags, create a command such as print and follow it with quotation marks around what you want outputted. Lastly, end the command with a semicolon.
3. Discuss one of the PHP error handling techniques that Eli presents.
PHP will complain about a line number in the file. Sometimes the error may not be on that line, but one after or before.
4. What is the difference between printing text and printing HTML?
Web browser reads tags and html coding while PHP prints out text. Thus when working with formatting, use html tags in your php so the browser displays the correct formatting.
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 web browser can read only a HTML code, and the PHP code is meant for a text viewer. So a HTML tag needs to be used within the PHP code for a web browser to read the print commands accurately. For example if a single print command in the PHP code needs to be split into two lines and displayed on the web browser, a HTML tag "<\br>" needs to be used at the place where a line break is needed, only then the message will be displayed in two lines in the web browser. If only "\n" command is used, it will be displayed as two lines only in the page source window and not in the web browser window, because a web browser can read HTML tags only. You will probably get an error. Or maybe your PHP code will not be executed.
PHP Programming Part 3: Comments and INCLUDE in PHP Programming
1. What are the three ways that you can make comments in PHP?
Single line: // or #
Multi line: /* */
2. What is the PHP include function? Why is it useful?
Grabs information form another file and includes it in the current file. This is useful because you don’t have to rewrite the information.

PHP Programming Part 4: Variables in Print in PHP Programming
1. What are the three types of PHP variables that Eli discusses?
Strings, integers, and arrays
2. What naming rules apply to PHP variables?
Must start with “$” and then with either a letter or underscore. Capitalization matters, PHP is case sensitive.
3. Compare and contrast the html <br> tag in HTML and the \n in PHP.
When the “</br>” tag is used, the break will be seen in the html web browser. When “\n” is used, the break will only be seen in the text source code; not the html browser.
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?
HTML creates the form and all of its objects. If we are going to do anything with the form, we are going to pass it to PHP. PHP writes the information to file or takes information and does something with it.
2. 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?
Textbox enables users to key in text. Option box restricts the choices down to a list of choices. Radio button pretty much does the same as option box, except all the choices are visible. Radio button usually has less choices than option box
PHP Programming Part 6: Printing to Files with PHP
1. In this example, you use the PHP file_put_contents() function. Briefly describe this function.
Hint: Consult W3Schools or the PHP manual.
This function writes the information, that was given, to a file.
2. What is a CSV file? Why would you want to use one?
Comma separated value file is a spreadsheet format. Can be opened with any spreadsheet program and then be saved as an excel file to be emailed.