PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. <?php
  2. // Begin the session
  3. session_start();
  4. // To avoid case conflicts, make the input uppercase and check against the session value
  5. // If it's correct, echo '1' as a string
  6. if(strtoupper($_GET['captcha']) == $_SESSION['captcha_id'])
  7. echo 'true';
  8. // Else echo '0' as a string
  9. else
  10. echo 'false';
  11. ?>