<?php
/*
captcha.php
jQuery Fancy Captcha
www.webdesignbeach.com
Created by Web Design Beach.
Copyright 2009 Web Design Beach. All rights reserved.
*/
session_start();
/* starts session to save generated random number */
/* this compare captcha's number from POST and SESSION */
if (isset($_POST['captcha'])) { if ($_POST['captcha'] == $_SESSION['captcha']) {
echo "Passed!";
/* YOUR CODE GOES HERE */ unset($_SESSION[captcha
]);
/* this line makes session free, we recommend you to keep it */ } else {
}
} else {
$_SESSION['captcha'] = $rand;
}
?>