View Single Post
Old 07-31-2012, 12:36 PM   PM User | #1
367
New Coder

 
Join Date: Nov 2011
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
367 is an unknown quantity at this point
Simple 'whats current year' spam protection in classic ASP

Hi
Title says what I need so I'll paste code that I have now. Am asp noob so
html
Code:
<span>Whats current year?</span>
<input type="text" name="year" />
asp
Code:
<% Dim captcha

captcha = Request.Form("year")

If captcha <> "&Year(Date)" Then
    Response.Redirect("wrong.asp")
End If

%>
Now it openes wrong.asp on page load automatically
I think that "&Year(Date)" part is wrong, but when i put "2012" instead, it also openes wrong.asp on page load.

Any suggestions?

Thanks
367 is offline   Reply With Quote