AIM 2

Tuesdays, 3:30 pm - 6:20 pm
Instructor: Erik Brown

Week 11

Progressive Enhancement

Luke W: mobile first

Hierarchy of concerns
GD vs PE

Modal demo
The plan

Some new jQuery methods:

Modernizr

FOUC remedy

More reading:
Using Media Queries in the Real World
Pragmatic Responsive Design

PHP Processing

Processing steps:

  1. Covert POSTdata from the form (aka: the input values) into usable PHP variables
  2. Validate important input variables, if desired
  3. Construct an email message
  4. Use the mail() method to send the message to your email
  5. Confirm the success/failure of the processing with the user

PHP operators

Simple form handling and simple_processing.zip

Contact form and contact_form.zip

PHP mail() function format:
mail(to,subject,message,headers)

E-mail injection risk


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

TOP