Html到这段代码 - PHP表单

时间:2013-12-17 09:04:50

标签: php html forms reference contact

我是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

http://pastebin.com/Nzq0TCVp

有什么建议吗?

0 个答案:

没有答案