I'm developing an application in which I need to click if any of the fields in a row is empty or not. If any of the fields is empty, then the variable $flag
should be 1, other wise zero.
I have written till here, but I'm not sure what to do next to check if each and every field is null/empty or not.
public function profileComplete($email)
{
global $conn;
$flag=0;
try
{
$s = $conn->prepare("SELECT * from users where emailid = : email");
$s->bindParam(":email",$email);
$s->execute();
$s->setFetchMode(PDO::FETCH_OBJ);
while($row = $s->fetch())
{
}
}
}
How should I code to make it work according to the requirements? All suggestions are appreciated.