The second module of CIS 2336 shifts the course's focus from the client-side technologies of the first module to server-side scripting. The ins and outs of PHP are examined, most notably its ability to coexist with and even enhance existing HTML pages. PHP dramatically expands the possibilities of design by allowing dynamic websites capable of customization and interaction with end-users.
Module 2 built on what was established in Module 1, showing how HTML pages styled with CSS can be further enhanced with PHP by allowing for customization and end-user interactivity. The fundamentals of PHP were taught through five assignments: Codecademy, PHP and MySQL for Dynamic Web Sites, PHP Manual, W3Schools, and Eli the Computer Guy. The Codecademy and W3Schools PHP assignments were similar to their HTML and CSS counterparts from Module 1. The Codecademy assignment showed me the basics of PHP server-side scripting through numerous interactive web tutorials that focused on the syntax, functions, and object-oriented programming components of the language. The W3Schools assignment served as a comprehensive review of all PHP materials and, like in Module 1, proved that it should primarily be used as a reference. Likewise, the PHP Manual assignment–another web tutorial–by and large also served as a review, reinforcing the basic concepts already introduced and also proving itself as a worthy reference source.
By contrast, the PHP and MySQL for Dynamic Web Sites assignment reviewed a large portion of the materials already covered but also presented some new, practical ways of looking at PHP, specifically its role in expanding the capabilities of HTML pages. The selected chapters from the book were accompanied by several example scripts, which I was able to download and easily follow along with the step-by-step instructions provided. The first chapter was a refresher for all things already introduced in Codecademy and W3Schools, but beginning with the second chapter and continuing into the third chapter, I was finally shown practical applications of PHP: (1) reducing repetitive code, (2) customizing pages, and (3) collaborating with HTML forms to receive and process data. This assignment had a distinct advantage over Codecademy, W3Schools, and PHP Manual in that its step-by-step approach to building pages hammered home the importance of individual steps and processes.
However, the highlight of Module 2 was the Eli the Computer Guy assignment, a series of YouTube videos that placed me in a virtual classroom to learn the basics of PHP. All video lectures began with a short introduction, in which Eli discussed the broad concepts of and the importance behind the lecture topics. Then, a general overview followed, in which explanations of the topics were roughly laid out on a whiteboard. Afterward, the lecture moved to a hands-on demonstration on an actual computer, on which all of the coding took place. Finally, the lecture wrapped up with a brief review of the materials covered, framing them in terms of their value in real-world applications. The real-world approach of the video lectures was reflected in its demonstrations using practical implementations of PHP in websites, and they helped put into perspective many of the dry, academic lessons from Codecademy and W3Schools, which by themselves often seemed disjointed, theoretical, or abstract. Additionally, the approachable and unintimidating nature of Eli the Computer Guy was effective in making me more receptive to learning PHP, which initially seemed foreign and overwhelming to me.
Part 5 of the Eli the Computer Guy assignment has been chosen for my learning portfolio because it exemplifies the main lesson from Module 2. If Module 1 was a crash course in teaching me how to use HTML for building a page's content and how to use CSS for styling that content, then Module 2 was a natural progression of Module 1 by teaching me how to use PHP to increase the possibilities of those HTML and CSS pages by making them dynamic through customization and end-user interactivity.
In this lecture, Eli the Computer Guy shows how to create a form on an HTML page that takes the data from a user's input and sends it to a PHP script for further processing. By reading and accessing data this way, the page can be considered dynamic.
I have created a sample page based on the lecture's demonstration, which may be previewed below or viewed in a separate tab/window here.
This sample page uses an HTML form to accept input from a user. The user can type his name in the text box, select a size from the option box, and click on the radio button for his gender. After the user clicks the Submit button, the data is passed to a PHP file for further processing. In this case, the PHP script simply prints the summarized data submitted from the form. However, these basic concepts involving inputting and submitting data will prove to be more useful when databases are introduced, as the next module will show.
Note that although this example does not use CSS styling, any of the methods learned in Module 1 for CSS styling could be applied here to make a more visually appealing form and page.
To view the page in a separate tab/window, please click here.