See your physician. It is common for 21 month old children to get viral upper respiratory illnesses which cause coughing and congestion. But no child during this process should be "foaming" at the mouth. That may indicate possible oropharyngeal swelling (throat) and difficulty swallowing. Please see your pediatrician immediately.