$v){ foreach($badStrings as $v2){ if(strpos($v, $v2) !== false) { die("Forbidden - You are not authorized to view this page 2"); exit; } else { ${$k} = stripslashes(trim($v)); } } } // Made it past spammer test, free up some memory // and continue rest of script: unset($k, $v, $v2, $badStrings, $authHosts, $fromArray, $wwwUsed); $errors = array(); if ($requiredselect == "") { $errors[] = "Please select a product of interest."; } if ($requiredsalutation == "") { $errors[] = "Please select a salutation."; } if ($requiredname == "") { $errors[] = "Please enter your name."; } if ($requiredcompany == "") { $errors[] = "Please enter your company."; } if (!validEMail($requiredemail)) { $errors[] = "Please enter a valid email address."; } if ($requiredaddress == "") { $errors[] = "Please enter a street address."; } if ($requiredcity == "") { $errors[] = "Please enter a city."; } if ($requiredstateorprovince == "") { $errors[] = "Please enter a state or province."; } if ($requiredcountry == "") { $errors[] = "Please enter a country."; } if ($requiredzipcode == "") { $errors[] = "Please enter a zip code."; } // if ($requiredlocation == "") { // $errors[] = "Please enter your city and country."; // } if ($requiredphone == "") { $errors[] = "Please enter your telephone number."; } // if ($requiredfax == "") { // $errors[] = "Please enter your fax number."; // } if (strtolower($_SESSION['CAPTCHAString']) != strtolower($_POST['captchastring'])) { $errors[] = "Please enter the captcha characters as displayed."; } $fdate = date("l, F j, Y \a\\t H:i:s"); if (count($errors) == 0) { // Send email $msg = "Below is the result of your feedback form. It was submitted by $requiredaddress on $fdate -------------------------------------------------------------------------------- Product of Interest: $requiredselect Salutation: $requiredsalutation Name: $requiredname Company: $requiredcompany Email: $requiredemail Address: $requiredaddress City: $requiredcity State: $requiredstateorprovince Country: $requiredcountry Zip code: $requiredzipcode Phone: $requiredphone Text: $textarea "; mail($recipient,$subject,$msg,"From: $requiredemail"); foreach ($a_recipients AS $e_addr) { mail($e_addr,$subject,$msg,"From: $requiredemail"); } header("location: $redirect"); exit; } } //print_r($a_recipients); ?> Error
Error: Invalid Fields
The following errors were encountered in your submission form:

    $error\n"; } ?>

These fields must be completed before you can successfully submit the form.

Please use your browser's back button to return to the form and try again.