Wenn es in der Datenbank keine E-Mail gibt, dann muss "Sorry, there are no emails" kommen. Es kommt aber nicht. Hat Jemand eine Idee warum?
PHP-Code:
$query = "SELECT email FROM tabelle WHERE birthday LIKE '$birthday'";
if ( $result = mysqli_query($cxn, $query) ) {
while ( $row = mysqli_fetch_assoc($result) ) {
echo $row['email']."\r\n";
}
mysqli_free_result($result);
} else {
echo "Sorry, there are no emails";
}
Kommentar