"PHP and MySQL for Dynamic Websites" by Larry Ullman is a great textbook that guides readers through the definition and functionality of PHP and SQL. In this assignment, PHP was the main focus, primarily chapters 1 - 3; these chapters focused PHP basics with good example programs that teach the reader step-by-step on what the example is doing. The first chapter was an introduction to PHP, teaching the bare necessities of the language and basic syntax principles. The second chapter extends the previous and goes more in depth with programming with PHP. Finally, the third chapter covers the aspect of creating and processing web forms that are submitted to a web server. It also covered the importance of form validation and authentication.
Click here for an example program from Chapter 1. This program demonstrates everything disucssed in the first chapter (variables, if/else statements, and basic functions) and emphasizes the difference using double and single quotation marks. It takes a quantity being bought and the price for each unit and prints out the total. This chapter has taught me the essentials of PHP, including syntax principles, how to start variables, if/else statements, and functions.
Click here for an example program from Chapter 2. This demonstration gives you a form to fill out with credentials such as name, age, email, and gender. Inside the form is a php script that takes the information from the form and performs other functions such as printing out a confirmation message with the credentials given by the user. It also validates the form for entries that were not filled or not filled appropriately; if there are errors, it sends a message to go back and complete the form again. This chapter helped me gain a deeper understanding of setting up forms and how the information from a form is processed in a PHP script stored on a server. It taught how to obtain information using $_POST and $_METHOD functions and it also taught how to validate forms using if/else statements to see if anything was valid.
Click here for an example program from Chapter 3. An example website is given in this program that has a toolbar that has a navbar that goes to a gas mileage calculator. In this chapter, I learned the basics of creating a dynamic websites and functions such as include() and require(). I also learned how to create header and footer files for a website that can be used for things like displaying advertisements. The more dynamic part of this chapter was the gas mileage calculator, which took input using a variety of input types and calculating the results within the form. Each time, the results were different and dynamic for every user.