Hi Gurus, I am trying include captcha future to sinitz forum. What i am doing is just keeping n number of images in an array.Randomly generate of the images and making the user to enter the data. I have done client side validation and included the future in post.asp. Untill this point i am successful. But trying to do some server side validation. But doing so stops posting replies or new topic etc. this is my code.
<% '######Server side validation for Cpatcha starts here
dim str dim rnd1 str= request.form("UserInput") rnd1= request.form("RandValue") session("UserMsg")=request.form("Message") session("UserSubj")=request.form("Subject") dim valid valid = true dim myArray (10) myArray(0)="TKRc12" myArray(1)="6N8133" myArray(2)="2H15FK" myArray(3)="7t9t27" myArray(4)="9pGr2T" myArray(5)="6tH8p6" myArray(6)="4K6ed3" myArray(7)="DkxP44" myArray(8)="c3ea2W" myArray(9)="kMA669" dim i
if str="" then valid= false Response.redirect("post.asp") else for i = 0 to 9 dim j j=i+1 if (j= rnd1) then if (myArray(i)=str)then valid=true exit for else valid = false Response.redirect("post.asp") exit for end if end if next end if
'######Server side validation for captcha ends here
can any body help me in this since i am new to asp and that too development. What i am trying to do is validating the user data, keeping the user message in session variable and keeping back the user data in the message box when validation fails.
I am running out of energy and time. can anybody give some advise.