Use of verification code for PHP development verification code
Use of verification code
New form
输入正确'; } else{ header('Content-type: text/html; charset=UTF8'); echo '输入错误'; } exit(); } ?>确认验证
Code explanation:
输入正确'; } else{ header('Content-type: text/html; charset=UTF8'); echo '输入错误'; } exit(); } ?>确认验证
Make an html verification code verification page, pass the submitted value to the form.php file through post submission, and import the picture into captcha-2.php,
onclick="this.src = this.src + '?' + new Date().getTime();
Every time you click Picture randomly generates a new picture.
输入正确'; } else{ header('Content-type: text/html; charset=UTF8'); echo '输入错误'; } exit(); }
php judgment, calling the verification information stored through SESSION, judging the user's original input and comparing it with the information stored on the server. If they are equal, the input is correct, if they are not equal, the input is incorrect.
Now the production of alphanumeric verification code is completed.