query(""); $num = $q->num_rows; echo ''; if ($num > 0) { echo ''; } else { echo ''; } echo ''; // new messages $q = $mysqli->query(""); $num = $q->num_rows; echo ''; if ($num > 0) { echo ''; } else { echo ''; } echo ''; ?>