I am trying to create a public form where users can upload multiple images to be attached to a particular post. I am able to get it to work with single images thanks to this post at Golden Apples Design.
The problem is that I’m struggling with multiple file uploads. I’ve changed
<form method="post" action="#" enctype="multipart/form-data" >
<input type="file" name="upload_attachment">
<input type="submit">
<form>
to
<form method="post" action="#" enctype="multipart/form-data" >
<input type="file" multiple=multiple name="upload_attachment[]">
<input type="submit">
<form>
Now the $_FILES array is in a different format and the file handler doesn’t handle it properly. Can anyone help me figure out how to loop through the array in the correct way and feed the file hander the format it wants?