Location: PHPKode > scripts > Security Image > security-image/testSecurityImage.php
<?

require "securityImageClass.php";

$si = new securityImage();
$si->setFontColor("000000");
$si->setFontSize(5);
$si->setCodeLength(8);
$si->inputParam = "style='color:blue;'";

if (isset($_POST['callback'])) {
	if ($si->isValid()) {
		echo "Code is valid";
	} else {
		echo "Code is invald";
	}
}
?>
<html>
<body>

<form name=test action="<?=$_SERVER['PHP_SELF'] ?>" method=post>

<input type=hidden name='callback' value='1'>

<table>
<tr>
<td>Enter: <? echo $si->showFormInput() ?></td>
<td><? echo $si->showFormImage() ?></td>
</tr>
<tr>
<td colspan=2>
<input type=submit>
</td>
</tr>
</table>

</form>

</body>
Return current item: Security Image