Header ("content-type:text/html; charset=gb2312 ");
Class chkinput{
var $name;
var $pwd;
function Chkinput ($x, $y)
{
$this->name= $x;
$this->pwd= $y;
}
function Checkinput ()
{
Include (".. /conn/conn.php ");
$sql =mysql_query ("select * from Tb_admin where name= '". $this->name. "'", $conn);
$info =mysql_fetch_array ($sql);
if ($info ==false)
{
echo "";
Exit
}
Else
{
if ($info [pwd]== $this->pwd)
{
if ($number ==$_session[' code ')
{
Header ("location:index.php");}
Else
{
echo "";
Exit;}
}
Else
{
echo "";
Exit
}
}
}
}
$obj =new chkinput (Trim ($_post[name]), trim ($_post[pwd]));
$obj->checkinput ();
?>
Reply to discussion (solution)
$number ==$_session[' code ';
Breakpoint Debug Output Verification code
If your $_session[' code ' is a verification code, then what is the number of the code, and if it's a captcha, why not post it?
I want to determine whether the input verification code is consistent with the verification code on the image, $_session[' code ' is the verification code of the picture, number is my text box named verification code, how should I modify it?