Created
December 30, 2014 17:40
-
-
Save robtuley/ac9538d206405aca5521 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
$ans = $_POST['captcha']; // .. or whatever! | |
$checksum = md5(strtolower(trim($ans))); | |
if (in_array($checksum,$_SESSION['captcha_ans'])) { | |
// passed..! | |
} else { | |
// error: redisplay form, etc. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment