Hi and welcome to the forum! I am glad that I can help you.
You want to know the cause of the symptoms that you experience.
Painful swollen glands on the neck may indicate several medical conditions such as parotitis, lymphadenitis, tonsilitis, or mononucleosis. Parotitis is a viral infection that affects the salivatory glands and is characterized by edema of one or both salivatory glands. Lymphadenitis is inflammation of the lymph nodes and is characterized by pain, edema and redness of the skin. Tonsilitis appears in cases of a sore throat and may be accompanied with increased body temperature. Mononucleosis is a viral infection that causes sudden weakening of the immune system which is presented with secondary bacterial infections, most commonly tonsilitis.
According to the data that you described, you may or may not experience one of the medical conditions listed above. See your doctor for further diagnosis and treatment options.
Please keep in mind that I provide medical information only. I am not able to diagnose medical conditions online. Please contact your doctor for further advice and information about diagnosis and treatment options.