Fixed the problem. Changed the parameter Name in the form to 'image[]' and added the correct grammar to the loop