I'm trying to make this code work correctly, but the same thing I noticed only compares the day because if it's bigger than the current day works correctly, but if it's shorter than the current day it has the error "Your account has expired" it is as if he did not compare the month nor the year! But in case the other topics do not serve me because they are to compare 2 different dates that is stored in the variable, my date is from the database!
$vencimento = $dado['vencimento'];
if (date("d/m/Y") > $vencimento) {
echo "A sua conta expirou";
}
else {
echo "A sua conta ainda não expirou";
}