Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function process_membershipenquiry() {
- if( isset( $_REQUEST['action'] ) && ($_REQUEST['action'] == 'membershipenquiry') ) {
- $subject = "New Membership Enquiry:".$_REQUEST['inf_field_FirstName'].' '.$_REQUEST['inf_field_LastName'];
- $content = "First Name: ".$_REQUEST['inf_field_FirstName']."<br>";
- $content .= "Last Name: ".$_REQUEST['inf_field_LastName']."<br>";
- $content .= "Email: ".$_REQUEST['inf_field_Email']."<br>";
- $content .= "Mobile: ".$_REQUEST['inf_field_Phone1']."<br>";
- $content .= "Location: ".$_REQUEST['inf_custom_Location']."<br>";
- $content .= "Age Group: ".$_REQUEST['inf_custom_AgeGroup']."<br>";
- add_filter( 'wp_mail_content_type', 'set_html_content_type' );
- if($_REQUEST['inf_custom_Location'] == 'Kempsey') {
- wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
- } elseif($_REQUEST['inf_custom_Location'] == 'Bribie Island') {
- wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
- } elseif($_REQUEST['inf_custom_Location'] == 'Townsville') {
- wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
- } elseif($_REQUEST['inf_custom_Location'] == 'Cheras') {
- wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
- } elseif($_REQUEST['inf_custom_Location'] == 'Nottingham') {
- wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
- } elseif($_REQUEST['inf_custom_Location'] == 'Doncaster') {
- wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
- }
- exit;
- }
- }
- add_action('init','process_membershipenquiry');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement