class Login{
public $conn;
public $u;
public $p;
public function __construct($u,$p){
$this->u=$u;
$this->p=$p;
$this->conn=mysqli_connect("192.192.192.7","userTest","userTest123123","wmshd");
$this->conn->query('SET NAMES UTF8');
}
public function login(){
$sql="SELECT password,db FROM setting_user WHERE user='".$this->u."'";
$q=$this->conn->query($sql);
$r=$q->fetch_array(MYSQLI_USE_RESULT);
if($this->p==$r["password"]){
return $r["db"];
}else{
return 0;
}//if
}//login
}//