You can try Panadol according to the dosage recommended for your child’s age and weight but it is very important to go to the dentist as soon as possible.
Pain on eating usually means there is inflammation inside the pulp (nerve) of the tooth. Once this occurs, it is probably too late to place a simple filling, and more complex treatment may be required eg pulp therapy. If this is not done, it is likely the tooth will eventually abscess and need root canal therapy or even extraction.
Bad pain, pain occurring for no apparent reason, pain when the child is going to bed or waking the child will often mean the pulp (nerve) is irreversibly inflamed and will need to be removed.
Once a child has toothache, it is probably too late to just place a filling as the inflammation is already present and must be treated. If not, then an abscess may occur and tooth removal may be necessary.
The most important thing is to seek treatment with your dentist. If you are not sure, contact a Paediatric Dentist who can provide advice and treatment now, and advice on preventing future problems.