Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error code for CAPTCHA

Status
Not open for further replies.

cakaan

Technical User
Jan 14, 2009
3
All,
I have almost completed implementing captcha on a webform.

I would like to have an error message appear below the box for entering the captcha letters, if the code is not correct. I really don't want to send them to a separate page if the captcha code is incorrect.

The following URL is to a zip file that contains these 2 files: form.html and processor.php


Can someone help me figure out to add something to the form.html page that will show an error message if the code that was imputted is incorrect?

Any help will be appreciated.

Thanks in advance.
 
i advise against image based captcha unless you really need it. you might consider, instead, an alternative to image based captcha is posted here

however, if you must use image based captcha then simply return them to the same page and display the message you want. the browser should have cached much of the display so there should not be too great a time lag. the problem with using ajax to validate the captcha code is that it may well leave a door open to bypass the protections as the js would need to report back to the form submission process that the validation was correct.
 
Hi

cakaan said:
I really don't want to send them to a separate page if the captcha code is incorrect.
There should be no need for a separate page. The captcha error should be handled and displayed together with the other possible errors. I mean, you should have some validation. ( No, not JavaScript. That is not validation. Only who not wants will not bypass it. )
cakaan said:
Can someone help me figure out to add something to the form.html page that will show an error message if the code that was imputted is incorrect?
In a static HTML document ? You probably mean with JavaScript, before form submission. Yes, it is possible with AJAX. ( You may google for "ajax captcha" because such implementations already exists. ) But again, that would be only JavaScript. So you should double check it on server.

Feherke.
 
jpadie,

Can you explain this syntax?
Code:
echo nonce::getNonce($_POST['type']);

Thanks!

--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Yes, I was ... Thank you!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Nothing like giving up the opportunity to learn ...

Really, if you have no intention to learn, why bother others and ask questions at all? That really troubles me!

Who's loss is it anyway ??? [ponder]

--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
And who gives you the right to judge southbeach?

It really erks me when individuals jumps to conclusions and don't even know the individual who they are making conclusions against.

For your information, I am not giving up the opportunity to learn. I found a solution that helped me with my problem much faster.

So I take it you have never been given the opportunity in life to do something much faster without you learning how to do it the first time and I am not talking about techie stuff?

So before you throw stones at others, look in the mirror bro!!!
 
My apologies, I did not intended my post to be a personal one and I really was not aiming at offending you.

I guess that expect other to use this forum in the same fashion and for the same reasons I do.

That being said, I personally think that it is a solution if you truly understand what it does, how it does it, when it does it, why it does it ... otherwise ... well, it is not a solution.

Again, I never intended to offend you but to encourage you!



--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top