/lib/jquery-validate/demo/captcha/process.php
PHP | 14 lines | 7 code | 3 blank | 4 comment | 2 complexity | afef8cf46165b79b9135e055afd84675 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
- <?php
-
- // Begin the session
- session_start();
-
- // To avoid case conflicts, make the input uppercase and check against the session value
- // If it's correct, echo '1' as a string
- if(strtoupper($_GET['captcha']) == $_SESSION['captcha_id'])
- echo 'true';
- // Else echo '0' as a string
- else
- echo 'false';
-
- ?>