PHP Classes

File: example2.php

Recommend this page to a friend!
  Classes of Abdulrahman Muhammad   Ocheck class   example2.php   Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: example
Class: Ocheck class
Display and verify validation images
Author: By
Last change:
Date: 16 years ago
Size: 1,119 bytes
 

Contents

Class file image Download
<?
#
# 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();
}





?>