Week 11
Progressive Enhancement
Hierarchy of concerns
GD vs PE
Some new jQuery methods:
More reading:
Using Media Queries in the Real World
Pragmatic Responsive Design
PHP Processing
Processing steps:
- Covert POSTdata from the form (aka: the input values) into usable PHP variables
- Validate important input variables, if desired
- Construct an email message
- Use the mail() method to send the message to your email
- Confirm the success/failure of the processing with the user
Simple form handling and simple_processing.zip
Contact form and contact_form.zip
PHP mail() function format:
mail(to,subject,message,headers)
Survey form and survey_form.zip
PHP implode() function format:
implode('separator', array);
Ex: $whatever = implode(', ', $_POST['whatever']);
each value in the array will be separated by a comma in the resultant email
How to recycle a PHP form handler file across an entire website (simple method).
Read:
Web Style Guide: Enterprise Interface
Harvard Business Review: Medieval Marketing
Due next week:
Assignment 4: fully functional; use
form_handler.php
Assignment 5