AssignmentEli

Below are the answers to the questions from the AssignmentEli videos.

PHP Programming Part 1: Introduction to PHP Programming

  1. How does Eli describe PHP?

  2. PHP is a useful scripting language to create interactive webpages.

  3. Briefly compare and contrast scripted and compiled languages.

  4. Compiled languages use software and when the code is executed, it creates and un-editable file. Scripted languages are uploaded through files to a server that delivers information to a user.

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

  6. Server side scripting involves a server reading PHP and sending it back to the user in HTML. Client side scripting involves information being sent to the users computer.

  7. 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?

  8. Craigslist. It uses HTML as well as PHP and MySQL; it is very effective.

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

  10. PHP allows you to pull information from the server.

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

  12. A text editor that is simple to use for languages like PHP.

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

  14. A text editor and a server that supports PHP.

  15. How does Eli describe syntax?

  16. How you spell commands.

PHP Programming Part 2: PHP Syntax and Errors

  1. In a Linux context, does capitalization matter?

  2. Yes.

  3. What are the basic attributes of PHP syntax?

  4. "<?php" Opens the PHP file and closes with "?>". Anything that is to be printed needs to be surrounded with quotes and commands must end with a semi-colon.

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

  6. The browser will print an error message and tell you what line the error is on.

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

  8. The browser will read HTML and PHP will print out text.

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

  10. The browser will only read the HTML, so the PHP code will not be displayed at all.

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

  12. With // or # for single line and /* for multiple lines.