用于多步联系表单的PHP电子邮件脚本

时间:2015-07-08 17:35:14

标签: php jquery forms multi-step

我正在使用此多步骤联系表单:http://thecodeplayer.com/walkthrough/jquery-multi-step-form-with-progress-bar

不幸的是,它不会发送电子邮件。

我的表格与上面的例子相同。唯一的区别是我已经将开头表格标签修改为:

<form id="msform" method="post" action="/mailer.php">

这是我的mailer.php的样子:

if(isset($_POST['submit']))
{
$email = $_POST['email'];
$name = $_POST['name'];
$pass = $_POST['pass'];

$to = "me@mydomain.com";
$subject = "Submission from Multi-Step Form";
$message = "Name: ".$name."</br>Email: ".$email."</br>pass: ".$pass;

$headers = "From: ".$_POST["email"]."\r\n";
mail($to, $subject, $message, $headers);  
}

0 个答案:

没有答案