Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

preventing form spam with hidden field

22 views
Skip to first unread message

DK

unread,
Feb 26, 2007, 1:06:42 PM2/26/07
to
I don't know much about scripts, but figured out just enough to use ASPMail
on my site for simple Web page forms that users can fill out to request more
info, and the ASP file sends the info to me as an email.

Problem is, I keep getting spam through the Web form, and I want to try to
block as much as I can.

I've read (see http://www.webmasterworld.com/webmaster/3218242.htm) that the
best solution to prevent spam bots is to use a hidden field in the form (not
visible to Web page users but the spambots fill it out automatically) and
then when the form is submitted, have the script check to see if anything
was entered into the hidden field. If text was entered, then an email is not
generated to me.

How can you do this in a simple ASP script? The link above explains how to
do it in PHP, but how do you do it in ASP? Is it possible? Thanks for your
help!

Steve Embry

unread,
Apr 5, 2007, 5:07:47 PM4/5/07
to
Hi DK-

There a couple ways to go...one that is usually good enough and a bit
simpler..and another which, at this point is still infallible.

Either change all the filed names in your database and on your forms to be
very generic:

field1,field2,field3,field4,field5, etc..
Then create a table in your database to map those field names appropriately.

This works most of the time because most bots aren't intelligent enough to
compare the HTML on the page with an adjacent field name:
ex.:
First Name: ______field1_________
Some bots can figure it out, but not many...

The only thing I've found that prevents all the bots is using image
verification which you can devise yourself using ASP, a database, and some
graphics...or you can probably find a "canned" image verification module you
could add to your website forms pretty affordably.

Steve


"DK" <no...@NoSpam.com> wrote in message news:clFEh.22$xo...@newsfe04.lga...

0 new messages