You had an undercooked burger, ate some deviled eggs that were sitting out on the picnic table a bit too long, or sampled something from a dodgy food truck…and now you're paying the price. Here's how to spot the signs and symptoms of food poisoning—and how to treat it.

What causes food poisoning

In the majority of food poisoning cases, the technical term for your misery is gastroenteritis—an irritation of the stomach and intestines. It's typically caused by bacteria (such as Salmonella, E. coli, or Campylobacter) or a virus (like norovirus).

In the case of food poisoning, you likely picked up bacteria in something you ate (duh), but you can also get gastroenteritis from coming in contact with someone who's infected, or not washing your hands after going to the bathroom. (You'll sometimes hear it referred to as "stomach flu," but it has nothing to do with the influenza virus.)

RELATED: 14 Foods That Can Make You Sick

Food poisoning symptoms

The signs of food poisoning can range from very mild (a passing stomachache) to severe (fever and nonstop diarrhea). Depending on which bug you've picked up, symptoms start in as little as 8 hours, but you may not start feeling sick for up to 2 weeks. You might have:

• Nausea
Abdominal pain
• Low fever
• Diarrhea
• Vomiting
• Cramps
• Bloating

RELATED: 18 Reasons Why Your Stomach Hurts

How to treat food poisoning

DON'T take an over-the-counter anti-diarrhea drug without a doctor's OK. Your body is trying to expel the bugs that are making you sick, and you don't want to interfere with the natural healing process.

DO stay hydrated. You'll need to replenish all the fluids you're losing, to avoid serious dehydration. Sip electrolyte-rich liquids, like Gatorade, broth, or coconut water. If you're keeping down fluids, slowly introduce easy-to-digest foods, like the classic BRAT diet: bananas, rice, applesauce, and toast.

If you're a healthy adult with a solid immune system, most bouts of food poisoning will pass on their own after a couple of, ahem, crappy days. In general, there's nothing you can really do to speed the healing. The best thing you can do is rehydrate, rest, and try not to dwell on the meal that did this to you.

RELATED: Stomach Ache? What to Eat to Feel Better

When to get help

See a doctor if you have any of the following symptoms:
1. You have diarrhea along with a fever higher than 101°.
2. You're dizzy, light-headed, or intensely thirsty.
3. You haven't kept anything down for 24 hours.
4. You've had diarrhea for five days or more.

Go straight to the ER if you have any of these symptoms, which may point to a life-threatening case:
1. Your stool has a lot of blood in it (i.e., it's maroon or black).
2. You have a pounding, racing, or skipping heartbeat.
3. You're sick from shellfish, mushrooms, or a canned item—toxins from these foods can have especially serious consequences.