【发布时间】:2015-05-05 14:07:13
【问题描述】:
我正在为一位朋友寻找一个网站,用他的一个表单解决他的垃圾邮件问题。
表单被发布到使用 PHP 到 .ASP 函数的网站上,我遇到的问题是我试图应用 hunnypot 验证码,但我遇到了 PHP 函数的问题。
我想知道是否有人可以为我指明正确的方向。
这是表格
// Usage: [form]form action URL here[/form]
function form_func( $atts, $content = null ) {
extract(shortcode_atts(array(
'action' => '',
), $atts));
return '<div class="text-center"><strong>Apply Now with this easy form</strong></div>
<form id="contact-form" action="'.do_shortcode($content).'" method="post" novalidate="novalidate">
<ul>
<li><input type="text" name="name" placeholder="Name:" id="name" value="" /></li>
<li><input type="tel" name="phone" placeholder="Telephone Number:" id="phone" value="" /></li>
<li><input type="text" name="post-code" placeholder="Post Code:" id="post-code" value="" /></li>
<li><input type="email" name="email" id="email" placeholder="Email:" value="" /></li>
<li class="email2"><input type="email" name="repeatemail" id="repeatemail" placeholder="Email:" value="" /></li>
</ul>
<input type="submit" value="Send" />
</form>';
}
这是它被发送到的地方
http://www.bigresponder.com/remote_contact.asp?si=563&p=494225795
这是我已经启动的 PHP
if($_POST['repeatemail'] != ''){
echo "It appears you are a bot!";
}
else{
//process the rest of the form
}
这是css
li.email2{display:none;}
我已将此应用于表单,但垃圾邮件仍在通过,所以显然我遗漏了一些东西。
【问题讨论】:
标签: php forms asp-classic