Hey everyone, Here is a link to the Lab 8 write-up: http://www.cs.washington.edu/education/courses/190m/08sp/labs/8-buyagrade/ And here are the solutions (and more) to each exercise of the lab: https://webster.cs.washington.edu/rctucker/lab8/ The lab is pretty much the same as what Kevin showed everyone on Tuesday, though we got rid of the writing to a file part because the students never process or use the data, anyway. (And we're not *really* trying to get credit card numbers, right? ...) The quick breakdown of the lab goes as follows: Exercise 1: Create the form -- Add the
tag and the name/value attributes to make the form usable. They don't create a .php file yet at all, but instead post to https://webster.cs.washington.edu/params.php (the same tester file used in lecture) Exercise 2: Displaying the data and creating the .php file -- Now they make the .php file to handle the form submission. In this step, they're just making a confirmation page that spits back the name and credit card info. Exercise 3: Verify existence of data -- Now their .php file will make sure all fields were filled out when submitting (using the isset function). Failure to do so results in an error message, otherwise the same confirmation page shows up. Exercise 4: Verify Credit Card length, digits -- They do a little more form validation, this time checking to see that the credit card number is 16 numerical digits by using regular expressions. Exercise 5: Luhn Check -- Finally, they use the Luhn Checksum algorithm to validate the credit card number. Kevin's algorithm is provided, as well as a link to the wiki page. Special thanks to Kevin for writing the initial solution code and to Ryan who did a ton of work on the write-up and the breakdown of the exercises!! Hope lab goes well for everyone! Be sure to email Marty with how it goes, if you have a chance. See you tomorrow! Victoria