Sort:  

Yes an expectorant cough syrup will make you cough out phlegm. But if your cough is an allergy you needed an antiallergy (antihistamine) tablet.
If your phlegm is yellow it might be an infection so you needed an antibiotic prescribed by a doctor. @ashtv

Also take vitamin C regularly because it will make you resistant to such common sicknesses. :)

Great advice. Phlegm has gone but the daily vitamin c is a good call! 👍🏻