Multiple file upload error |
[eluser]EEssam[/eluser]
Hi, The following code (http://ellislab.com/forums/viewthread/66017/) is not working for me: Code: function upload_images() And I have the following in my view: <?php echo form_upload('myimages[]') ?> <?php echo form_upload('myimages[]') ?> <?php echo form_upload('myimages[]') ?> <?php echo form_upload('myimages[]') ?> - The error message: You did not select a file to upload. - I'm using form_open_multipart Please help, what's wrong? Thanks.
[eluser]LuckyFella73[/eluser]
Don't you need to set up the arrays when using the form helpers? like: Code: $data_file_1 = array( As far as i know, the usage of Code: myimages[] Code: push_array($destination_array, $new_data) for example Code: $myimages[] = 'data_to_push_into_array_myimages'; But maybe I'm wrong and just are not familiar with the coding style you used! I don't know how your view file looks in detail so it's hard to say what could be missing ..
[eluser]crumpet[/eluser]
maybe you get that error because it is trying to uplaod fields you have left blank from what i can tell your code doesn't account for fields that aren't filled try putting die(print_r($keys)); right after you declare that variable and see what you are actaully getting for data |
Welcome Guest, Not a member yet? Register Sign In |