I’ve had a bad cold for the past 8 days. Now it’s worse I have a cough with phlegm. Sharp pains in lower left back, hurts when I breath in.

Needs to be checked. You should consult your doctor asap or go to ER.From your history it seems that you may have Pnumonia.You need a thorough physical examination,blood test,sputum culture and Xray Chest.So go to ER and get checked.