$value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");} $message = build_message($_REQUEST); $message = stripslashes($message); $subject = "DanceSport Center Inquiry"; $subject = stripslashes($subject); if($from_email) { $headers = "From: " . $from_email; $headers .= PHP_EOL; $headers .= "Reply-To: " . $_REQUEST['email']; } else { $from_name = ""; if(isset($_REQUEST['name']) && !empty($_REQUEST['name'])){$from_name = stripslashes($_REQUEST['name']);} $headers = "From: {$from_name} <{$_REQUEST['email']}>"; } mail($my_email,$subject,$message,$headers); } } // don't worry about these. This is just for illustration purposes: it sets a DEFAULT value to some // fields, which is overwritten when the user fills it in if (!isset($fields["custom_alpha_field1"])) $fields["custom_alpha_field1"] = "BCD-AEI"; if (!isset($fields["custom_alpha_field2"])) $fields["custom_alpha_field2"] = "aB012"; if (!isset($fields["custom_alpha_field3"])) $fields["custom_alpha_field3"] = "bB34"; if (!isset($fields["custom_alpha_field4"])) $fields["custom_alpha_field4"] = "OUoucgAa"; if (!isset($fields["custom_alpha_field5"])) $fields["custom_alpha_field5"] = "#8rtyhWRGS"; ?>
We are located at:|
|