mysql - How to change button color in php?
one text
Solution:
Try something like this, where you actually check which number rowcount possses
$status = $sql->execute();
if (($status) && ($sql->rowCount() > 0)) {
return "yellow";
} else {
return "red";
}
Source