Thats better thanks
Well nothing is wrong with the upload portion etc.
See the problem is this. Your honestly doing something I think no one will ever do because you always as I stated before you upload images in a line. The thing is if there is some special code that is needed for that first thumbnail to set that image as the image display and if you dont have a 2nd or 3rd image then the image is null display follow me.
Thus I have rewrote the code to do a different check just incase someone is dyslexic and doesnt follow the 1-6 direction. Download the build and reupload showproduct.php