You haven't mentioned your age. The symptoms you had could be possibly to two reasons.
1. you may be having hypoglycemia
which means you blood sugar levels may have fallen due to which the glucose
supply to your brain decreased and you feel dizzy. secondly it occurs due to fall in blood pressure. if you are young and don't any history of diabetes
then the best remedy for both is take adequate fluids like citric and fruit juices. if possible check your blood pressure and blood sugar levels when ever you develop such symptoms.
Dr M Ishfaq Habib