Can anybody please teach me how to install php unit and how to use it in a normal php function like this.....I have searched on Youtube and on google as well most of the way of installing php unit is outdated and none of them teach properly. I am a windows user. Thank You!
class Login extends Connection
{
public $id;
public $username;
public $password;
public function getUsername($USERNAME)
{
$this->username=$USERNAME;
}
public function getPassword($PASSWORD)
{
$this->password=$PASSWORD;
}
public function setUsername($USERNAME)
{
$this->username;
}
public function setPassword($PASSWORD)
{
$this->password;
}
public function login1()
{
$query="select * from tbl_user where Username='$this->username' &&
Password='$this->password' ";
$res = mysqli_query($this->conn,$query);
$num = mysqli_num_rows($res); //it counts selected rows in database
if($num==1)
{
echo "logged in";
}
else
{
echo "failed";
}
}
}