我是php新手,我的webhost不允许我在http://www.freecontactform.com/email_form.php上运行简单的php表单
他们引导我进入知识库并要求我使用这个PHP代码,我试图将其与我当前的表单集成,它只是没有发送任何电子邮件
这是php代码:
<?
$mailto = "xyz@yourdomain.com";
$file = "thanks.htm";
$pcount = 0;
$gcount = 0;
$subject = "Mail from Enquiry Form";
$from = "some-name@yourdomain.com";
while (list($key, $val) = each($_POST)) {
$pstr = $pstr . "$key : $val \n ";
++$pcount;
}
while (list($key, $val) = each($_GET)) {
$gstr = $gstr . "$key : $val \n ";
++$gcount;
}
if ($pcount > $gcount) {
$message_body = $pstr;
mail($mailto, $subject, $message_body, "From:" . $from);
include("$file");
} else {
$message_body = $gstr;
mail($mailto, $subject, $message_body, "From:" . $from);
include("$file");
}
?>
这是html
有什么建议吗?