
Untitled
By: a guest on
Aug 12th, 2012 | syntax:
None | size: 0.60 KB | hits: 7 | expires: Never
/**
* Validate the code entered by the user.
*
* <code>
* $code = $_POST['code'];
* if ($securimage->check($code) == false) {
* die("Sorry, the code entered did not match.");
* } else {
* $valid = true;
* }
* </code>
* @param string $code The code the user entered
* @return boolean true if the code was correct, false if not
*/
session_start();
include '../Security/SecurImage.php';
$_POST["dontRefresh"] = true;
$securimage = new Securimage();
if($securimage->check($_POST['code'])){
echo 'true';
} else {
echo 'false';
}