I have a huge form that lets users (along with a lot of other inputs) upload multiple images, like this:
<input type="file" id="product_images" class="hidden" name="upload[]" multiple>
<input type="file" id="product_images_2" class="hidden" name="upload[]" multiple>
...
Now, when there is an error in a certain input (e.g. String for "description"-field too short), the page reloads. After this reload I need to keep all the posted data in all the inputs. For a text input I know how to do it, like this:
<input name="name" type="text" value="<?php echo $_POST['name']; ?>"/>
but, how can I achieve this for the file
inputs?
I tried something like this:
<input type="file" id="product_images" name="upload[]" multiple value="<?php print($_POST['upload']); ?>">
Did not work though. Any ideas? Thanks!