Log in

View Full Version : Spam in html form



Jim Weinberg
05-17-2008, 01:39 PM
I'm not sure that this is the proper place to post this problem, but if not, hopefully someone will tell me where it belongs.

My problem is: I have an html form on my site that allows people to join our club by providing various pieces of information. Lately, I've been getting resonses containing garbage. I validate every field in the form with javascript, so I don't know how they're getting around that. The bulk of the garbage seems to be in fields which are only supposed to contain numbers (i.e. zipcode). These are checked to insure that only numbers are entered. Dispite that, the formsmail that gets generated when the submit button is clicked contains non-numbers such as web addresses.

Can someone tell my how that happens and, more importantly, how to protect against it?

Thanks in advance.

Jim

thetestingsite
05-17-2008, 02:31 PM
I validate every field in the form with javascript, so I don't know how they're getting around that.

your problem lies in the highlighted section of the quote I posted above. Javascript can be turned off and in some browsers (or if it is a bot) is disabled by default. You should consider using some sort of server side validation just to be on the safe side. In any case, another thing you could do to stop this sort of thing from happening (or at least, from getting to you) is incorporating a CAPTCHA (such as recaptcha.net or you could write your own).

Anyways, hope this helps.