Megapixels is not the answer.
You can have a huge 50mp camera with crap image quality.
Sensors, lenses, etc all come into play.
Iphones generally have a better camera than the ipads. as long as the iphone is the same year or newer than the ipad, id say go for it.
Also try do it in a well...