diff -r 000000000000 -r d970ebf37754 wp/wp-content/themes/IN-MOTION-package-u1/in-motion/includes/process.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wp/wp-content/themes/IN-MOTION-package-u1/in-motion/includes/process.php Wed Nov 06 03:21:17 2013 +0000 @@ -0,0 +1,89 @@ +You have recieved a new message from the enquiries form on your website.

+

Name: {$name}

+

Email Address: {$email}

+

Telephone: {$telephone}

+

Enquiry: {$enquiry}

+

Message: {$message}

+

This message was sent from the IP Address: {$ipaddress} on {$date} at {$time}

"; + + mail("goran.freshmaker@gmail.com","New Enquiry",$emailbody,$headers); + + } + + //what we need to return back to our form + $returndata = array( + 'posted_form_data' => array( + 'name' => $name, + 'email' => $email, + 'telephone' => $telephone, + 'enquiry' => $enquiry, + 'message' => $message + ), + 'form_ok' => $formok, + 'errors' => $errors + ); + + + //if this is not an ajax request + if(empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest'){ + //set session variables + session_start(); + $_SESSION['cf_returndata'] = $returndata; + + //redirect back to form + header('location: ' . $_SERVER['HTTP_REFERER']); + } +}