The first contact this kind of check for a long time will not =-solve

Source: Internet
Author: User
The first contact with this check for a long time will not =-solve
 
!--? php
session_start ();

Class chkuserlogin{

private $username;
Private $password;


Public Function __construct ($username, $password) {
$this->username= $username;
$this->password= $password;



require_once ("connn.php");
$sql =mysql_query ("Select account from root where username= '". $this->username. "' and password= '". $this->password . "'", $conn);
$info =mysql_fetch_array ($sql);
if ($info ==false) {
echo "";
Exit
}else{
if ($_session["UNC"]!= "") {
Session_unregister ("UNC");
}
Session_register ("UNC");
$_session["UNC"]= $this->username;
mysql_query ("Update root set Logintimes=logintimes+1,lastlogintime=". Date ("Y-m-d h:i:s"). "'", $conn);
echo "";
}
}
}

$obj =new chkuserlogin ($_post["username"],md5 ($_post["password"]);
$obj->chk ();
?


A small piece of code for login verification My database has no password for localhost root, my database has saved a set of passwords. Unlimited password error jump page and also errors



=-Free Humbly


------to solve the idea----------------------
How did you execute this program?
------to solve the idea----------------------
References:
 




Administrator br>


















!--/login-content-->




!--/login-wrapper-->



!--Le javascript
==================================================-->
!--Placed at the end of the Docum ent so the pages load faster-->







=-Use this page
Your username and password have not been submitted in the past.

The red box is added separately
Name= "username"
Name= "Password"
Try again.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.