My code below is sending me the email even if this statement isn't true if($value['flagS']=='Yes'& $value['flagE']=='Yes' & $value['flagL']=='Yes' & $value['flagML']=='Yes') see my code below and assist, where am i going wrong
$flagquery = "SELECT * FROM approved";
try
{
$stt = $db->prepare($flagquery);
$stt->execute();
}
catch(PDOException $ex)
{
die("Failed to run query: " . $ex->getMessage());
}
$rows = $stt->fetchAll();
foreach($rows as $value):
if($value['flagS']=='Yes'& $value['flagE']=='Yes' & $value['flagL']=='Done' & $value['flagML']=='Done'){
$message = "your request was approved <br/>
<br /><br />";
$subject = "Application $identifier has been approved ";
$email="xx@xxx.co.xx";
send_mail($email,$message,$subject);
Blockquote