Objectives
  • Utilize autoglobal variables
  • Build XHTML Web forms
  • Process form data
  • Handle submitted form data
  • Create an All-in-One form
  • Display dynamic based on a URL token
  • Utilize debugging techniques
  • Create error free code
Assignments and Due Dates


Assignments and Due Dates: View
CS2623 Coding Standards - requirements for all class assignments

Required Readings

PHP Programming with MySQL //Second Edition by Don Gosselin, et al
Chapter 4 - Handling User Input
Appendix E - Error Handling and Debugging
Text Resources
     Errata Sheet
     Best Practices

Debugging and Error Handling (HTML reference page)

Recommended Tutorials
Video: Lynda.com

PHP with MySQL Beyond the Basics by Kevin Skoglund

    2. Intermediate PHP Techniques

    • Setting Server and Request Variables
      Request variable in in Appendix D of the text

PHP with MySQL Essential Training by Kevin Skoglund

11. Working with Forms and Form Data (All videos) (I know this is quite a bit, but I really think it is worth it and should make the book much easier to understand)

PHP with MySQL Essential Training by Kevin Skoglund

9. Debugging

PHP for Web Designers by David Powers

    7. Debugging (All videos)

        • See notes below about .htaccess file mentioned in the first video
Required Sample Code
The sample code is in a file which must be downloaded and extracted to location accessible by the server.
Supplemental Materials
  • Chapter 4: PowerPoint from Text     View (.ppt) | Print (.pdf)
Software

Same software as previously indicated.

Chapter Questions and Test Reviews

Chapter 4: Review Questions (.rtf file)
Test 2: Review Sheet

Required and Extra Credit Assignments
  • SSP05: Dynamic Content (Complete, upload to Apollo1, then submit URL in the LMS)
  • Weekly Quiz: Chapter 4 (Located in the LMS)
  • EC01: Debugging Extra Credit (Download the zip file which includes php files that require modifications as well as the assignment specifications.)
Professor's Class Notes and Comments

Chapter 4 includes code for configuring email. Apollo1 is not set up with email capabilities. So please read this information even though we cannot implement it. A good portion of the chapter deals with forms. However, forms are not included in this week's assignments.(Weird to me also, but we will just go with the text) It will be used in the future and will be on the test, so please do not just skim it. It is a very important topic.

This week there are some instructor prepared sample files which can be downloaded for your use. The link is located in Sample Code panel above.

Chapter 4

p. 198
Review the sample code in 01_SimpleForm.

p.199
Pay close attention to the first note (right margin, exclamation point icon)

p. 201
Review the sample code in 02_MultipleErrors.

p. 203
Review the sample code in 03_StickyForm.

p. 209
Review the sample code in 04_AllInOne. Be sure to spend some time on this. It may take a bit to understand but it is definitely worth the effort.

p. 212
Review the sample code in 05_WebTemplate.

From this week's sample files don't skip this one...
sample code in 06_ButtonLinks which uses <input type="images" .../>

Appendix D:

p. 680
For a review &~ in side note(with light bulb) means and not

p. 681
The error log file is located at c:\wamp\logs\php_error.log for Windows and from the Wamp icon in the system tray. On a Mac it is located at c:\applications\mamp\logs\php_error.log

Displaying Errors

Also be sure to look at the Debugging and Error Handling located in the Required Readings panel above.

In the video by David Powers, he recommends turning the display of error codes on by add a file known as .htaccess to the root of the server. This will only work on the local server. Also on a Mac, it is a hidden file (anything that begins with a period (.) is hidden). I really do not recommend changing the settings to display hidden files (even though he had a video on it). I think adding code to the webpage and then removing/commenting it out later, is a much better approach.

It might be tempting not to completed the work on Debugging, but please resist the temptation. Learning ways to debug web pages may save you a great deal of time and frustration as the course progresses. I cannot stress it enough... WATCH the VIDEOS!
There is extra credit available this week if you are interested. See the Assignments panel above. Even though the Debugging Assignment is extra credit, you will still be responsible for the course content on Debugging when test time arrives.

Don't forget about the review questions and the weekly quiz in addition on to the Chinese Zodiac assignment.