下面是我的联系表格的PHP代码,该网站现在正在使用,当我使用表格使用联系我们表格发送查询时,并非所有信息都通过:
在我收到的电子邮件中,唯一的信息是$ subject和消息($ name想要移动$ move.\ r \n \n";).没有客户输入的其他数据网站列在电子邮件中.我查看了代码,似乎无法找到问题所在.
我将不胜感激任何帮助.
<?php
if(!$_POST) exit;
$to = 'mydomain@email.com';
$name = $_POST['txtname'];
$email = $_POST['txtemail'];
$phone = $_POST['txtphone'];
$comp = $_POST['txtcomp'];
$emp = $_POST['txtemp'];
$move = $_POST['txtmove'];
$comment = $_POST['txtmessage'];
if(get_magic_quotes_gpc()) { $comment = stripslashes($comment); }
$subject = 'You\'ve been contacted by ' . $name . '.';
$msg = "You have been contacted by $name.\r\n\n";
$msg .= "$comment\r\n\n";
$msg .= "You can contact $name via email, $email.\r\n\n";
$msg = "You can call $name on …Run Code Online (Sandbox Code Playgroud)