Location: PHPKode > scripts > Friendly CAPTCHA > friendly-captcha/example.php
<?php

require('library/FriendlyCaptcha.class.php');
require('library/MathCaptcha.class.php');

$testcaptcha = new mathCaptcha();
$testcaptcha->generateProblem();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CAPTCHA Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php 

//Generate hidden CSS
$testcaptcha->hiddenCss(); 

?>
</head>
<body>

<form action="example_submit.php" method="post">

	<fieldset id="contactinfo">
	<legend>Verify you are human</legend>

	<label for="math_captcha"><?php $testcaptcha->printProblem(); ?></label>
	<input name="math_captcha" id="math_captcha" type="text" class="textinput" />
	
	</fieldset>
	
	<div>
	<input name="submit" value="Submit" type="submit" />
	</div>
	
<?php

//Generate optional Javascript for improved accessibility
$testcaptcha->hiddenJavascript();

?>
	
</form>

</body>
</html>
Return current item: Friendly CAPTCHA