提交 | 用户 | 时间 | ||
58d006 | 1 | <?php |
A | 2 | |
3 | // Begin the session | |
4 | session_start(); | |
5 | ||
6 | // To avoid case conflicts, make the input uppercase and check against the session value | |
7 | // If it's correct, echo '1' as a string | |
8 | if(strtoupper($_GET['captcha']) == $_SESSION['captcha_id']) | |
9 | echo 'true'; | |
10 | // Else echo '0' as a string | |
11 | else | |
12 | echo 'false'; | |
13 | ||
14 | ?> |