I am looking at a website for a friend, to resolve his spam issue with one of his forms.
the form is posted to a website using PHP to an .ASP function, the issue i have is i an trying to apply hunnypot captcha, but am having trouble with PHP function.
i was wondering if some one could point me in the right direction please.
here is the form
// 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>';
}
this is where it is being sent to
http://www.bigresponder.com/remote_contact.asp?si=563&p=494225795
and here is the PHP i have started
if($_POST['repeatemail'] != ''){
echo "It appears you are a bot!";
}
else{
//process the rest of the form
}
and this is the css
li.email2{display:none;}
i have applied this to the form, but the spam is still getting through, so obviously i am missing something.