"Review 2 other people's code and provide a 1/2 page written report on how their solution differs from yours." I reviewed the first two classmates with posted websites: Neeley ("Stephens College Historic Costume Collection Guestbook") and Kofsky (UMR Residential Life Early Arrival Form). These two peers were selected from the bottom of my posted links of peer websites. For clarity, I reviewed the three solutions problem by problem.
Requirement 1: . . . HTML form with at least 5 different inputs
I noticed immediately that both Neely and Kofsky use the browser default background color (in my case, pale yellow). I think from a presentation standpoint, it is a good to specifiy a background color else the layout and clarity of the form may be less effective against the often default horrible gray or worse, lost with black text against a user specified black background.
I may have reviewed Neely's too soon because I received errors when submitting the form and when I tried to click on the view past file submissions around 11 pm, Sunday night.
[submit] Parse error: parse error in /home/nacf34/public_html/ch2_submit.php on line 13
[view past file submissions] Not Found The requested URL /~nacf34/viewpast.php was not found on this server. Apache/1.3.29 Server at myclass.eyebits.com Port 80
For the first several inputs, Both Kofsky and Neeley used standard variable names that were recognized by my browser, FIREFOX. Neither attempted error-checking of any variables submitted via the FORM which could result invalid data and no way to contact the submitter for correction. I created a form for a real application and was familiar with a few of the pitfalls of letting the ISP default form processing ACTION submit data. Therefore, I used the PHP to verify email addresses so that I contact participants if there was a problem.
Requirement 2: . . . String comparison to generate customized feedback in program
Requirement 3: . . . Provide a program-generated HTML feedback page for the user
I was unable to access Neeley's source code for the ACTION=filename. Kofsky echoed back the user input and I did not seet any conditionals (such as IF or SWITCH statements) that would provide custom feedback based on user input. I entered some nosensical information, checking for any error-processing of key data. The program echoed back my input which provided an odd feedback. I used several string comparison functions to validate email addresses and produce three different custom feedback pages: (1) form processed correctly; (2) email addresses do not match; and (3) email is not a MU domain.
Requirement 4: Save all form submissions to a text file with browser information
Requirement 5: Provide a link to review past submissions
While this tasks may seem pretty straightforward, I was aware that my application text file output has to be imported into an EXCEL spreadsheet for distribution to several MU departments and organizations. Therefore, I had the application create a "comma delimited" text file for easy import into EXCEL. I also wanted to log all submissions so I wrote the variable, $valid, to the beginning of the data stream -- value of 0 = valid submission and 1 = error. The file then could be sorted and the valid submissions stripped off for distribution. Kofsky's echoed the data stream to a raw text file and used it as input for a formatted report.