我有一個表單觸發提交的電子郵件,但我想重定向到提交不同的頁面。電子郵件沒有觸發重定向到頁面
<form id="customisesystem" name="enquiry" onsubmit="return formCheck(this);" method="POST" action="<?php echo the_permalink(); ?>">
我想這個更改爲以下:
<form id="customisesystem" name="enquiry" onsubmit="return formCheck(this);" method="POST" action="<?php bloginfo('url'); ?>/thank-you">
然而,這沒有按」
目前的電子郵件只有滿足以下(即重新加載相同頁面)來通過觸發電子郵件。
任何人都可以看到出了什麼問題?
這是發送電子郵件的腳本。
<? if(isset($_POST['submit'])) {
$to = "[email protected]";
$header = 'From: [email protected]';
$subject = "Quotation";
$enquiry_first_name = $_POST['enquiryfirstname'];
$enquiry_last_name = $_POST['enquirylastname'];
$enquiry_title = $_POST['enquirytitle'];
$enquiry_organisation = $_POST['enquiryorganisation'];
$enquiry_address = $_POST['enquiryaddress'];
$enquiry_country = $_POST['enquirycountry'];
$enquiry_email_address = $_POST['enquiryemailaddress'];
$enquiry_telephone = $_POST['enquirytelephone'];
$enquiry_additional_comments = $_POST['enquiryadditionalcomments'];
$enquiry_product = get_the_title();
if(!empty($_POST['hardware'])) {
foreach($_POST['hardware'] as $check) {
$hardwareresults .= $check."\n";
}
}
if(!empty($_POST['systems'])) {
foreach($_POST['systems'] as $check) {
$systemsresults .= $check."\n";
}
}
$productresults = "";
$quantities = array_combine($_POST['product'], $_POST['quantity']);
foreach ($quantities as $product => $quantity) {
if ($quantity > 0) {
$productresults .= "$quantity x $product \n";
}
}
$body = "You have a quote request from the website:
Name: $enquiry_title $enquiry_first_name $enquiry_last_name
Type of organisation: $enquiry_organisation
Address: $enquiry_address, $enquiry_country
E-Mail: $enquiry_email_address
Tel: $enquiry_telephone
Comments: $enquiry_additional_comments
Send more information on:
$systemsresults
Quotation:
$enquiry_product
Hardware:
$hardwareresults
Accessories:
$productresults
Kind regards";
mail($to, $subject, $body, $header);
echo "Thank you for your enquiry.";
} ?>
顯示你的js動作(formCheck)請 – 2013-02-15 11:14:19
你在哪裏發送php代碼發送謝謝頁面或者同一個表單頁面 – anstrangel0ver 2013-02-15 11:17:02