Advertisement
Guest User

IF

a guest
Sep 18th, 2017
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1.  
  2. function process_membershipenquiry() {
  3. if( isset( $_REQUEST['action'] ) && ($_REQUEST['action'] == 'membershipenquiry') ) {
  4. $subject = "New Membership Enquiry:".$_REQUEST['inf_field_FirstName'].' '.$_REQUEST['inf_field_LastName'];
  5. $content = "First Name: ".$_REQUEST['inf_field_FirstName']."<br>";
  6. $content .= "Last Name: ".$_REQUEST['inf_field_LastName']."<br>";
  7. $content .= "Email: ".$_REQUEST['inf_field_Email']."<br>";
  8. $content .= "Mobile: ".$_REQUEST['inf_field_Phone1']."<br>";
  9. $content .= "Location: ".$_REQUEST['inf_custom_Location']."<br>";
  10. $content .= "Age Group: ".$_REQUEST['inf_custom_AgeGroup']."<br>";
  11. add_filter( 'wp_mail_content_type', 'set_html_content_type' );
  12. if($_REQUEST['inf_custom_Location'] == 'Kempsey') {
  13. wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
  14. } elseif($_REQUEST['inf_custom_Location'] == 'Bribie Island') {
  15. wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
  16. } elseif($_REQUEST['inf_custom_Location'] == 'Townsville') {
  17. wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
  18. } elseif($_REQUEST['inf_custom_Location'] == 'Cheras') {
  19. wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
  20. } elseif($_REQUEST['inf_custom_Location'] == 'Nottingham') {
  21. wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
  22. } elseif($_REQUEST['inf_custom_Location'] == 'Doncaster') {
  23. wp_mail('pbpaulbright+kempsey@gmail.com', $subject, $content);
  24. }
  25. exit;
  26. }
  27.  
  28. }
  29. add_action('init','process_membershipenquiry');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement