Contact me:

Email

Return to Eli-PHP Tutorials

PHP Programming Part 1: Introduction to PHP Programming


Eli's example PHP program
1. How does Eli describe PHP?
Eli describes PHP as a programming language that makes websites useful. PHP does this by allowing you to interact with data and dynamically write webpages to the end user. This is much more convenient than having to manually editing the page with HTML, CSS, or JavaScript.

2. Briefly compare and contrast scripted and compiled languages.
Compiled programming languages uses a compiler, which creates an executable binary file from reading the code. The .exe file can be run by the computer and is difficult for a human to edit or read. Scripted languages use a text file that installs an interpreter on the server. Scripted languages remain as a text file that can always be read, and the program is created on the fly as the text is read by the interpreter.

3. Briefly explain the difference between client side and server side scripting.
In server side scripting, the client’s computer connects to the webpage and makes a request to the webserver. In that request, all of the operations are performed on the webserver, and the completed information is returned to the client’s computer. Client side scripting runs the entire program on the destination computer, meaning that the script and other private information on the script, such as usernames and passwords, can be read on the client computer.

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’s example of the power of PHP and MySQL is Craigslist. He mentions Craigslist as a good example because it looks rather primitive, but is an extremely powerful site written primarily with PHP.

5. What does Eli emphasize as the 'nice' thing about scripted languages such as PHP?
Eli emphasizes the ‘nice’ thing about PHP is that it is server side. This is important for security reasons, since the web server only returns the results and not private information such as usernames, passwords, and the databases being accessed.

6. What is notepad++? Why would Eli recommend notepad++?
Notepad++ is a slightly upgraded version of the notepad program that has additional features to facilitate with programming.

7. If you want to write and run PHP code, what do you need?
The only thing you need to write and run PHP code is an ASCII text editor and a web server with PHP is installed.

8. How does Eli describe syntax?
Eli describes syntax as the “spelling” of the commands being used in programming. One simple syntax mistake can make the entire program not run. For this reason, Eli recommends using reference material while learning PHP.