I have a function isNotEmpty which returns true if the string is not empty and false if the string is empty. I've found out that it is not working if I pass an empty string through it.
$strTemp = $input;
$strTemp = trim($strTemp);
if(strTemp != '') //Also tried this "if(strlen($strTemp) > 0)"
//validate the phone number
echo "Phone number not entered<br/>";
Simple problem actually. Change:
if(strTemp != '')
if($strTemp != '')
Arguably you may also want to change it to:
if($strTemp !== '')
!= '' will return true if you pass is numeric 0 and a few other cases due to PHP's automatic type conversion.
Also bear in mind PHP has an empty() function already.