我按照一个简单的教程在这里工作:http: //estrellaprofessional.com/contact.html
我得到了除 first_name 和 last_name 之外的所有值。
我使用的代码如下:
<?php
$country=$_POST['country'];
$prospect=$_POST['prospect'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$all=
"email: ".$email."\r\n".
"Contact Form Submission ".$subject."\r\n".
"country: ".$country."\r\n".
"prospect: ".$prospect."\r\n".
"first_name: ".$first_name."\r\n".
"last_name: ".$last_name."\r\n".
"message: ".$message."\r\n";
$mailheaders = "From: $email\r\n";
$mailheaders .= "To: amarkmc@gmail.com\r\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
mail($toaddress, $subject, $all, $mailheaders);
echo("Thank you $name for your interest in Estrella Professional. Someone
from Estrella Professional will be in contact with you soon. Feel free to continue to browse the site.");
die;
?>
作为一个菜鸟,我不确定自己做错了什么?有人指出我正确的方向。提前致谢!