You can probably spot the problem with this statement, even if you're not familiar with logical fallacies. There's an issue here with correlation (things that happen at the same time) and causation (one thing happens because of the other thing).
This problem crops up in a lot of places. The human brain is trained to find patterns -- it's a survival instinct that helps to keep us alive -- but sometimes we find patterns that aren't actually there, or draw the wrong conclusions from patterns that do exist.
In this case, the causation is reverse: Birthdays don't make you live longer. Living longer, by definition, enables you to have more birthdays.
There are several other ways that correlation and causation can get screwed up:
- Reduction Fallacy: The assumption that a single event was caused by a single factor, when in reality multiple factors are all partially responsible. Unfortunately, life is rarely simple, so this happens a lot. After a school shooting, for example, you'll get people saying, "This happened because of guns!" or "This happened because of mental health issues!" or "This happened because of violence in the media!" In reality, all of those factors may be at play -- and many more could also be responsible. It's very rare that complex problems are ever caused by a single root issue.
- Bi-Directional Causation: When A causes B, but B also causes A. So, for example, imagine a bank account that gains interest. The more money in the bank, the more interest it earns. The more interest it earns, the more money in the bank. If left alone, this causes a sort of "chicken or egg" feedback loop.
- Spurious Relationship: A and B are both caused by a third factor, C. One of my favorite examples, courtesy of The Flying Spaghetti Monster: A shortage of pirates causes global warming! After all, as the pirate population decreases, global warming increases! Of course, this is probably due to one or more outside factors, such as global industrialization, that cause both things to occur. Of course, not all examples of this are so silly.
- Affirming the Consequent: The format for this is, "If P, then Q. Q, therefore P." In other words, if one thing were to happen, Q would be the consequence; since Q has happened, P must have caused it. This is related to the reduction fallacy above in that it assumes that Q can only be caused by a single factor, therefore P must have happened. Here's a (cynical) example: "If Mary screws her boss, she'll get a raise. She just got a raise, so she must be sleeping with her boss."
- Denying the Antecedent: This is the inverse of the above. This one says, "If P, then Q. Not P, therefore not Q." So for example, "If I were rich, I'd be happy. Since I'm not rich, I'm not happy." This sort of neglects that you could be made happy by anything else.
There are other iterations, but they're all pretty similar. The trick to figuring out the correlation/causation issue is to do a bit of investigating. Things that seem obvious at first may not be so simple in reality, and making assumptions about them can lead you to try and solve problems in all the wrong ways. After all, you can't really solve a problem if you don't know the real cause of it.
Always ask yourself, "Could this have been caused by anything else? Is there some other element that could be behind all of this? Is it possible that the causation is actually inverted?"