Php user logon object-oriented

Source: Internet
Author: User
Convenience classes during the development process of login class terms are directly reflected. if we can create a class library of our own, we can use it directly to provide programming efficiency.

Convenience classes during the development process of login class terms are directly reflected. if we can create a class library of our own, we can use it directly to provide programming efficiency.

Class chk {
Private $ name;
Private $ pwd;
Public function _ construct ($ x, $ y ){
$ This-> name = $ x;
$ This-> pwd = $ y;

}
Public function chkuer (){
Include 'Conn/conn. php ';
$ Rs = new com ("adobd. recordset ");
$ Rs-> open ("select * from tb_user where username = ". $ this-> name. "and userpwd = ". $ this-> pwd. "", $ conn, 3, 1 );
If ($ rs-> eof | $ rs-> bof ){
Echo "cuowu ";
} Else {
Echo "dengluchenggong ";
}
}

}
?>

Related Article

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.