I have a small function that shows the output from Database values
but the error is I put the condition that if the function output value is empty then show N/A and if it is not empty then sow the database value here is the function
function ClientCompDesignation($ClientDesignation,$ClientCompany){
include "config/dbcon.php";
$SessionClientID=$_SESSION['uid'];
$ClientCDQuery="SELECT ClientCompany,ClientDesignation FROM ClientLogin WHERE ClientID='$SessionClientID'";
$CLaCDQueryRun=mysqli_query($con,$ClientCDQuery);
$CLCDRecordFetch=mysqli_fetch_assoc($CLaCDQueryRun);
$ClientDesignation=$CLCDRecordFetch['ClientDesignation'];
$ClientCompany=$CLCDRecordFetch['ClientCompany'];
echo $ClientDesignation. ' - ' .$ClientCompany;
}
Here is the how i am displaying in HTML
<p class="mb-0 text-secondary"><?php if(ClientAddress($clientCity,$ClientCountry)==""){
echo "N/A";
}
else {
echo ClientAddress($clientCity,$ClientCountry);
}
?>
</p>
the problem is even when there is value in database it shows the N/A
this is the output
Sr. UI/UX Designer - IntraDevelopersN/A
please help in this