* <? Php
Session_start ();
Header ('content-Type: text/html; charset = UTF-8 ′);
// Login verification
Include_once '../xyconn. php ';
If (strtolower ($ _ POST ["checkcode"]) = strtolower ($ _ SESSION ["randval"]) {
Unset ($ _ SESSION ["randval"]); // release the variable in the session
} Else {
$ Errs = "www.2cto.com Incorrect verification code !";
Unset ($ _ SESSION ["randval"]);
}
If (isset ($ _ POST ["m_name"]) & isset ($ _ POST ["m_pwd"]) & isset ($ _ POST ["checkcode"]) {
$ M_name = $ _ POST ["m_name"];
$ M_pwd = md5 ($ _ POST ["m_pwd"]);
$ SQL = "select * from manage_user where m_name = '". $ m_name. "' and m_pwd = '". $ m_pwd ."'";
// The problem is high.
$ Result = mysql_query ($ SQL );
If (! Mysql_num_rows ($ result) = 0 ){
$ _ SESSION ["m_name"] = $ m_name;
} Else {
$ Errs = $ errs. "The account and password are incorrect !";
}
}
If ($ errs ){
Echo $ errs;
Echo "<a href = 'index. php'> Please return and log on again! </A> ";
Exit;
} Else {
Echo "<script language = 'javascript '> ";
Echo "alert ('congratulations, login successful! ');";
Echo "location = 'xycms. php ';";
Echo "</script> ";
}?>
Www.2cto.com
Enhanced verification
Author: dark moon style (Goya penetration group) www.moonhack.org