Home  >  Article  >  php教程  >  PHP user login object-oriented class

PHP user login object-oriented class

黄舟
黄舟Original
2016-12-20 11:19:591278browse

The convenience of the login class in the development process is directly reflected. If possible, we can build our own class library and use it directly when it is convenient 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";
}
}

}
?>

The above is the content of PHP user login object-oriented class. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn