
Your message has been sent! Thank you for getting in touch. I look forward to replying to you shortly.
Name: {$name}
Email Address: {$email}
Telephone: {$telephone}
Voice Type: {$voice_type}
Enquiry: {$enquiry}
Message: {$message}
This message was sent from the IP Address: {$ipaddress} on {$date} at {$time}
"; mail("andrew@andrewconley.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, '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']); } } ?>