Mailing Address:
Pure Gumption L.C.
PO Box 1304
Bountiful, UT 84011
*');
}
}
function inError($f) {
global $has_errors;
global $errors;
if ($has_errors) {
#only a few fields; simple linear search is adequate.
foreach($errors as $errf) {
if ($f == $errf) {
return TRUE;
}
}
}
return FALSE;
}
$fields = array(
"first_name"=>"First Name",
"last_name"=>"Last Name",
"business"=>"Business or School Name",
"industry"=>"Type of Business",
"email"=>"Email",
"address"=>"Address",
"phone"=>"Phone",
"city"=>"City",
"position"=>"Job Title",
"state"=>"State",
"source"=>"How did you hear about us?",
"description"=>"Project Description",
"optout"=>"Opt out of emails",
"zip"=>"Zip Code");
$required=array("first_name","last_name","business","industry","email","address","phone","city","state","zip");
if (isset($_POST['submitted'])) {
$has_errors=0;
foreach ($required as $f) {
if (!check_val($f)) {
$has_errors=1;
$errors[] = $f;
}
}
if(!$has_errors) {
if (isset($_POST['optout'])) {
$wants_email="no";
} else {
$wants_email="yes";
}
$first_name=$_POST['first_name'];
$last_name=$_POST['last_name'];
$position=$_POST['position'];
$busness=$_POST['business'];
$industry=$_POST['industry'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$address=$_POST['address'];
$city=$_POST['city'];
$state-$_POST['state'];
$zip=$_POST['zip'];
$source=$_POST['source'];
$description=$_POST['description'];
$txt=<< Mailing Address:
Pure Gumption L.C.
PO Box 1304
Bountiful, UT 84011