Pediatricians prescribe antibiotics when they find a bacterial infection in a child, such as a strep throat (pharyngitis), chest infection (pneumonia), or an ear infection (otitis media). Unfortunately, antibiotics do not treat viral infections; they only help cure bacterial infections. Viral infections resolve on their own with time.
Most over-the-counter cold medicines do not work very well in babies either, and they can have noticeable side effects. Luckily, there are some safe and easy ideas for making your daughter more comfortable while she is sick. Try running a humidifier in her room, especially at night, to help loosen the nasal congestion. If she has lots of nasal congestion, you can put a few drops of salt water (1/4 teaspoon of salt mixed in 8 ounces of warm water) in each nostril and then use a bulb suction to help clear the secretions in her nose. Also, encourage her to drink a lot of liquids, which will help to thin out her phlegm.
Since your daughter has had a cough for a few weeks and it sounds like you do not think it is improving, you may want to have her checked by the doctor. Although a viral infection is the most likely culprit, you should always feel comfortable having your child examined by the doctor in order to reassure you and to have all of your questions answered.