I have a form here: http://www.testing-joestanford.co.uk/example/
I want it to submit to http://www.testing-joestanford.co.uk/ or elsewhere, it doesn't matter to me.
What do i need on that URL to process the form and send me an email of the data (in it's most basic form) without redirecting to that page (if possible).
Would it be some PHP such as:
<?php
// create mail message to merchant
$subject = "Form data";
$title = "Example title.";
SendEmail("[email protected]", $subject, $title, false);
function SendEmail($mailto, $subject, $title)
{
$header = "From: [email protected]"."\r\n";
$header .= "Reply-To: [email protected]"."\r\n";
$header .= "MIME-Version: 1.0"."\r\n";
$header .= "Content-Type: text/plain; charset=utf-8"."\r\n";
$header .= "Content-Transfer-Encoding: 8bit"."\r\n";
$header .= "X-Mailer: PHP v".phpversion();
$message .= "Name: PS".$name."\r\n";
mail($mailto, $subject, stripslashes($message), $header);
}
?>
Or am i barking up the completely wrong tree?
Any help is hugely appreciated, thank you.