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)!