<?
#
# By : Saanina [@gmail.com]
# 08:32 pm 28/08/28
//must use it in this example ..
session_start();
//inlude class
require ('ocheck_class.php');
//start class
$ch = new ocheck;
//metod for the form
//$ch->method = 'post';
//path of imgs
//$ch->PathImg = 'imgs';
if ( !isset($_GET['ok']) )
{
echo "
<div style=\"background-color:silver\">
hi ... this an example for verification code ..[this exaple use rand function]
<br /> U must choose right images to continue !!
enter [
";
$ch->rand();
echo"
]
<br />
</div>
";
echo "
<form action=\"?ok=1\" method=\"post\">
";
// show box
$ch->show();
echo "
<br />
<input type=\"submit\" value=\"continue\" />
</form>
</body></html>
";
}#get[ok ... = !
//now
if (isset($_GET['ok']))
{
// now .. we see result .. true or false
if ( $ch->result($_SESSION['ocheck']) )
{ echo "right ooIMG_Check .. you are the best ;) ..."; }
else
{
{ echo "wrong ooIMG_Check ... be careful man ..."; }
}
echo $_SESSION['ocheck'];
//to insert to sql for example
//echo $ch->save();
}
?>
|