Widget Order Form

Name:
Size:
Options:
Color: Red
Green
Blue
Accessories: Extension
Wall Mount
Desk Mount
Comments:
\n"; // check to see if a name was entered if (!$_POST['Name']) $errors[] = "Name is required"; // if there are any errors, display them if (count($errors)>0) { foreach($errors as $err) echo "$err
\n"; echo "
Please use your browser's Back button to fix."; } else { // no errors, so we build our message switch($_POST['color']){ case 'red': $recipient = 'redperson@myaddress.com'; break; case 'green': $recipient = 'greenperson@myaddress.com'; break; case 'blue': $recipient = 'blueperson@myaddress.com'; break; default: $recipient = 'me@myaddress.com'; } $subject = "Widget On Line Order"; $from = stripslashes($_POST['Name']); $msg = "Message sent by $from\n"; $msg.="\nSize: ".$_POST['size']; $options=$_POST['options']; $msg.="\nOptions:"; if ($options) for ($i=0;$iThanks for your order!

"; echo nl2br($msg); } else echo "An unknown error occurred."; } } ?>