Login   Register  
PHP Classes
elePHPant
Icontem

File: formhandler.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of m  >  Math Guard  >  formhandler.php  >  Download  
File: formhandler.php
Role: Example script
Content type: text/plain
Description: The php script which handles the verification and action
Class: Math Guard
CAPTCHA validation using math expressions
Author: By
Last change:
Date: 7 years ago
Size: 797 bytes
 

Contents

Class file image Download
<?


/* first we need to require our MathGuard class */
require ("ClassMathGuard.php");
/* this condition checks the user input. Don't change the condition, just the body within the curly braces */
if (MathGuard :: checkResult($_REQUEST['mathguard_answer'], $_REQUEST['mathguard_code'])) {
    echo (
"Great !"); //insert your code that will be executed when user enters the correct answer
} else {
    echo (
"Bad answer, go back to school !"); //insert your code which tells the user he is spamming your website
    
die();
}
?>
<br/>
<br/>
You entered:
title: <? echo($_REQUEST['title'])?>; <br/>
description: <? echo($_REQUEST['description'])?> <br/>
keywords: <? echo($_REQUEST['keywords'])?> <br/>
url: <? echo($_REQUEST['url'])?> <br/>
email: <? echo($_REQUEST['email'])?> <br/>