PHP Image Verification code with JavaScript verification

Source: Internet
Author: User
This post was last edited by CYYJM on 2013-08-15 11:48:37

Now my picture verification is handed to the background verification, feeling affect the query speed. How do I give JavaScript validation?
The code for the PHP generated page is as follows:
 
  


Front Style:
  

In this way, the background can be opened by Session_Start (), and $_session[' Vcode ') to determine whether the code is correct.
How can I authenticate through JavaScript without the need for PHP backstage to verify.


Reply to discussion (solution)

JavaScript verification can be easily bypassed or cracked, not recommended

All user-capable verification is not reliable.

What about this? First jump to the middle page, this page only to verify the code, if correct, then jump to the page output results, otherwise, give a hint, back to the original where to enter the page?

Sesssion saved on the service side, how can the front desk be obtained?

Verify with JavaScript???
What do you need the CAPTCHA for?

I pass the JS verification, just do not want the user again point more, jump back just to enter the correct verification code, directly in the point of the form when the verification.

I kind of understand the landlord you are submitted when the code user name password submitted together and did not determine whether the verification code is correct, so worry about the wrong and re-enter the user name password

In general, the use of Ajax here, when the Verification code input box loses focus, get input content to pass to the background to compare, if correct on the right side of the input box to tick the reverse system, then hit an x code error.

The input is correct and then submitted together into the background for next processing.

Right
What am I supposed to do about it? I just know a little bit about everything.

First of all, you need to know about Ajax. It's more convenient to work in 20 minutes from the AJAX study of jquery.

Http://www.baidu.com/s?wd=jquery+ajax Today I am also struggling with other problems can not help you write a complete set of code ...

Ajax break-through

The front also encountered this problem, the background to judge the captcha feel trouble. Want to use JS, but do not get verification code, and then think of the session in the verification to a hidden tag inside, and then use JS. Really bad to make ah, get the verification code is the last time, or before the refresh, always lag, and then give up.

The front also encountered this problem, the background to judge the captcha feel trouble. Want to use JS, but do not get verification code, and then think of the session in the verification to a hidden tag inside, and then use JS. Really bad to make ah, get the verification code is the last time, or before the refresh, always lag, and then give up.
This question carefully think about what is the reason, you hide the value of the label in the form is the value of the page initialization, and the user to see the value of the graphics verification code is new generation, and reset the verification code session value, so is a lag step. Landlord of the problem is like the previous Netizen said using Ajax to initiate judgment, the specific trigger way, I think is the key to play up, plus the verification code at the time of the input length to reasonably trigger Ajax events.
For example, 4-bit long verification code, the key to determine the length of the bounce, to 4 length on the Ajax judgment input is not correct.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.