我在我的表单上实现了这个http://www.websitecodetutorials.com/code/jquery-plugins/jquery-ajaxsubmit.php教程,表单成功运行并在提交时显示感谢 div。但问题是我没有收到任何电子邮件,似乎 PHP 邮件程序无法正常工作。
请看下面的代码
<?php
// Insert your email/web addresses and correct paths
$mailto = 'adil@adilsaleem.co.uk' ;
$from = "web@city.com" ;
$formurl = "http://astonstorlin.co.uk/citycoaches3/formmail.php" ;
$errorurl = "http://astonstorlin.co.uk/citycoaches3/error.php" ;
$thankyouurl = "http://astonstorlin.co.uk/citycoaches3/thankyou.php" ;
// Place Your Form info here...
$pickuppoint = ($_POST['pickuppoint']);
$destination = ($_POST['destination']);
// Check If Empty
// Add more Validation/Cleaning here...
// Place your Corresponding info here...
$message =
"Pick Point: $pickuppoint\n\n" .
"Destination: $destination\n\n" .
"noppl: $noppl\n\n"
;
// Leave Alone
mail($mailto, $from, $message,
"From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep );
header( "Location: $thankyouurl" );
exit ;
?>