View Single Post
  #10 (permalink)  
Old 05-15-2008, 12:12 PM
Tech Manager Tech Manager is offline
WebProWorld Pro
 

Join Date: Jan 2008
Posts: 297
Tech Manager RepRank 1
Default Re: Form spam help needed

Quote:
Originally Posted by fpeter View Post
Thank you everyone for your ideas and replying to my questions, most helpful.

I prefer not to go for a captcha or the sum due to the accesabilty issues and the fact that it adds something extra to the form to be filled in.

Since posting I have managed to figure out how to add a hidden field to my form using a div:

<div style="display: none;">
<input type="text" name="url1" id="url1">
</div>

I have called it URL1 as I think the bots would like this and fill it in.

I use CGI Formmail 3.14c1 to validate and send the form but I am stumped as to the part to add to tell the form not to send if this field has anything in it.

If anyone knows what and where to add it would be very much appreciated?
Contrary to the views of others you are not going to accomplish what you want using the display: none characteristic. You might catch a few spambots but not the sophisticated ones.

In response to:

Quote:
I use CGI Formmail 3.14c1 to validate and send the form but I am stumped as to the part to add to tell the form not to send if this field has anything in it.
It is quite simple to construct a filter. You can wrap your processing script with something like this:

if(isset($_POST['url1']) {

// Tell the script what to do if the variable has been filled in. You can exit, break, redirect, etc.

} else {

// Continue to validate and process the data

}
__________________
I use Country IP Blocks as added security for my networks and servers.

Last edited by Tech Manager : 05-15-2008 at 12:14 PM. Reason: to improve readability
Reply With Quote