Select query in php, Select query in php with where clause

<?php
//Database connection in php

$host='localhost';
$username='root';
$password='';
$dbname='myprojectdb';

$conn=mysqli_connect($host,$username,$password,$dbname);

//Select query in php

$sql="SELECT * FROM `member`";
$res=mysqli_query($conn,$sql);
$num=mysqli_num_rows($res);
if($num>0)
{
while($fetch=mysqli_fetch_array($res))
{
echo $fetch['name'];
echo $fetch['email'];
echo $fetch['phone'];
echo $fetch['address'];
}
}

//Select query in php with where clause

$sql="SELECT * FROM `member` WHERE `phone`='".trim($_REQUEST['phone'])."' AND `status`='A'";
$res=mysqli_query($conn,$sql);
$num=mysqli_num_rows($res);
if($num>0)
{
while($fetch=mysqli_fetch_array($res))
{
echo $fetch['name'];
echo $fetch['email'];
echo $fetch['phone'];
echo $fetch['address'];
}
}


?>