Start by breaking out of the loop early, first after the first iteration, then after the second, and so on, for both the sectors and the ring.
That should go from no polygons to a single triangle at the top of the sphere, and then if that looks OK then go to a full ring, and when that looks OK go to 2 rings.
It should make it much easier to isolate the problem, than trying to see why the full sphere looks like it does.
In this case I'm reasonably sure your problem is in building the indices. Are you drawing with GL_TRIANGLES?
If so you need 6 indices per quad, as it's built from 2 separate triangles. From your indices you need to draw a separate quad or triangle-strip for each sector.
If it still looks strange, do glDisable(GL_CULL_FACE) and see if it fixes it, which would mean face-winding is inverted.