Skip to content

Instantly share code, notes, and snippets.

@Logiks
Created May 27, 2015 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Logiks/bf3c3c11d6535467e4e0 to your computer and use it in GitHub Desktop.
Save Logiks/bf3c3c11d6535467e4e0 to your computer and use it in GitHub Desktop.
Captcha Usage In #Logiks
//This us a demo of how to use Captcha Widget In Logiks
//In Form
<INPUT NAME='USER_CAPTCHA_CODE' TYPE='TEXT' />
<?php
loadWidget("captcha");
?>
//This will generate the captcha and a captchaid in a hidden input field.
//On Server Side/Service section validate the captcha like this
<?php
$_SESSION['CAPTCHA'][$_REQUEST['captchaid']] SHOULD BE EQUAL TO USER INPUT FOR CAPTCHA FIELD
ie $_POST['USER_CAPTCHA_CODE']=$_SESSION['CAPTCHA'][$_REQUEST['captchaid']]
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment