So the SD card is corrupted, or something similar? Photos stored previously to the SD card aren't there? Is there anything else on the SD card?
There are tools to try and recover lost/deleted data from memory cards, when you connect the cards to your computer. If you think they've been deleted somehow, or that the card is messed up, I'd look into those tools.
One thing I'd do is connect the phone to a PC and search both the SD card and the internal storage for *.jpg.
Actually, if you were messing around in settings, were you using Manual mode? If so, did you change the pics to be stored in RAW (DNG) format, rather than JPG? If so, they apparently will not appear in the Gallery app. But they'd still be there, in large (~30MB?) RAW-format files.
Good luck!