Maryh--quit passing out bogus medical advise that sounds good to you. Neither yellow nor green have anything to do with bacterial infection. Increased phlegm, of any color, is almost always due to a viral (i.e. A cold) infection. Color is due more to hydration and white blood cell content, rather than bacterial infection. Antibiotics due absolutely nothing for a cold virus, except waste money, cause resistance, and possible drug side effects, which may be serious.
Clear and white is ok. Yellow means the beginning of an infection, either in the sinus' or lungs, better get an antibiotic. Green means the infection has definitely settled in - definitely get that medication now. Brown mixed in, means there is dried blood . Red mixed in, is blood.