我需要替换一个网站上的联系人表单,我以前在以前的联系人表单中使用通过PHP发送的确认电子邮件,因为属性操作是空的,所以我可以将PHP代码保存在同一页上。这是我以前的联系方式:
<form action="" method="POST">
<input type=hidden name="oid" value="00Db0000000IeRo">
<input type=hidden name="retURL" value="http://business.mytaxi.ie/thankyou.php">
<input id="email" maxlength="80" name="email" size="20" required="" type="email" value="" oninvalid="InvalidMsg(this);" oninput="InvalidMsg(this);" placeholder="email"/>
<a href="" class="bannerbutsub" title="get started for free.">get started for free.</a>
<input type="submit" name="submit" value="Register Interest" title="Register Interest" class="bannerbutsub">
</form>
if($_POST['email']){
$q = "INSERT INTO entries (email, datetime) VALUES ('".mysql_real_escape_string($_POST['email'])."',now())";
$r = mysql_query($q) or die(mysql_error());
$to = $_POST['email'];
$subject = 'Registration Confirmation';
$from = 'ireland.business@mytaxi.com';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: '.$from."\r\n".
'Reply-To: '.$from."\r\n" .
'X-Mailer: PHP/' . phpversion();
$message = '<html><body>';
$message .= '<p>Hi there,</p>';
$message .= '<p>Thanks for registering your interest in mytaxi | Business.</p>';
$message .= '<p>Our corporate service offers individuals and organisations complete visibility on taxi spend with on-demand automated reporting and as Irelandâs largest and only nationwide network, wait times are as low as 4 minutes. Thereâs options available to suit everyone: from enterprise organisations to SME\'s to individuals. </p>';
$message .= '<p><a href="https://www.youtube.com/watch?v=jGDxs9Xf0jA" target="_new"><img src="http://business.mytaxi.ie/youtube.jpg"></a></p>';
$message .= '<p>A member of our corporate team will be touch with you shortly.</p>';
$message .= '<p>Many Thanks, <br>mytaxi | Business Team</p>';
$message .= '</body></html>';
mail($to, $subject, $message, $headers);
工作很顺利,但后来我被要求用一张新的联系表代替
新的联系方式如下:
<form action="https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="GET">
<input type=hidden name="oid" value="00Db0000000IeRo">
<input type=hidden name="retURL" value="http://business.mytaxi.ie/thankyou.php">
<input id="email" maxlength="80" name="email" size="20" required="" type="email" value="" oninvalid="InvalidMsg(this);" oninput="InvalidMsg(this);" placeholder="email"/>
<input type="hidden" id="lead_source" name="lead_source" value="Web" />
<input type="hidden" id="country" name="country" value="Ireland" />
<input type="submit" name="submit" value="Register Interest" title="Register Interest" class="bannerbutsub">
</form>
如您所见,在新的联系人表单中,联系人表单的属性Action=“”中有一个URL,因此确认电子邮件不再工作。
我不能去掉价值,因为它是需要的。在用户提交CF后,是否有其他方法保存新的联系人表单并继续发送确认电子邮件?