The cause of yellow phlegm can be due to different types of chest infections that include bronchitis or pneumonia, notes the National Health Service. Chest infections can occur after a bad cold and can present other symptoms besides coughing up phlegm. For example, bronchitis symptoms can include a fever and a chronic cough that can last a few weeks, reports the Mayo Clinic.
Pneumonia can present similar symptoms and other like chest pain when trying to breathe and appetite loss. The difference between these two conditions is that bronchitis is typically caused by a virus, while pneumonia is caused by a bacterial infection. Because antibiotic are used to treat bacterial infections, it is not effective for bronchitis, according to the Mayo Clinic. However, a treatment option for patients that are hospitalized for pneumonia can be antibiotics, oxygen therapy and the use of intravenous fluids. relates the National Institute of Health.