目前我的编码对PHP执行post命令,将数据推送到电子邮件。 我希望找到一种方法,在服务器将电子邮件发送到URL之后重定向。
<?php
$email_from = 'my@e-mail.co.uk';
$email_subject = "New Form submission";
$email_body = "You have received a new insurance enquiry from $firstname $lastname $gender born on $dobday $dobmonth $dobyear $smoker is after $insurtype
They want to cover $cover,000 for $years years for $meandpartner
Contact information:
Mobile: $mobile
Telephone: $landline
E-mail: $email
Street: $street
City: $city
Postcode: $postcode
Partner details:
$pfirstname
$plastname
$pgender
$pdobday $pdobmonth $pdobyear
$psmoker
" ?>
<?php
$to = "my@email.co.uk";
$headers = "From: $email_from \r\n";
$headers .= "Reply-To: my@email.co.uk";
mail($to,$email_subject,$email_body,$headers);
?>
答案 0 :(得分:0)
答案 1 :(得分:0)
submitform = name of form
if (isset($_POST['submitform']))
{?>
<script type="text/javascript">
window.location = "http://www.google.com/";
</script>
<?php }