The verification code is a verification code class, but it is not very user-friendly during verification. if you use SESSION to save the number, it seems that you can only verify it from PHP in the background. you can get the $ _ SESSION value and compare it with the input value, can I put it on the front-end for verification? if I use JS like a user name, the user will know whether the error is correct after entering the verification code .. Thank you ~, The front-end ajax submits the back-end verification... generally uses the back-end verification. you can use the ajax verification code to solve the problem.
I made a verification code class, but it was not very user-friendly during verification. I used SESSION to save the number immediately.
It seems that it can only be verified by PHP in the background, and the value of $ _ SESSION is compared with the input value,
Can I put it on the front-end for verification? use JS like a user name. after you enter the verification code, you will know whether the error is correct.
How to do this .. Thank you ~
------ Solution --------------------
Front-end ajax submitted for background verification...
------ Solution --------------------
Generally, backend verification is used. ajax can be used for real-time verification.
If you have to directly verify it in front-end js, you can adopt encryption, but the risk still exists and is not recommended.
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