Multiple file upload not working... |
[eluser]Jamongkad[/eluser]
Hey guys I'm having trouble uploading multiple files. I use the examples given by other CI gurus here but it doesn't seem to work. Here's my code... View Code: <p><input type="file" name="userfile[]" SIZE="70" class='inputProjBox'/><?php echo anchor('','Add',array('class'=>'addInputFields')); ?></p> Model I run a foreach loop cuz I don't know how many files the user is going to upload. Fortunately it runs if I upload the first file. But the subsequent files no banana.. Code: function attachSprocketFile() Thanks!
[eluser]Arjen van Bochoven[/eluser]
[silly remark removed] What does the output give you?
[eluser]llbbl[/eluser]
I highly recommend reading this article on secure file uploads. www.scanit.be/uploads/php-file-upload.pdf but it could be something silly like forgetting the multipart stuff in the <form> tag.
[eluser]Jamongkad[/eluser]
Oh no that's my fault! of course I have the <form> tag included. What I posted was a snippet of html. Basically it uploads the first file but the subsequent files do not upload.
[eluser]kbauman[/eluser]
This question has been asked before, and I believe the answer is to use: Code: $this->upload->initialize($config); for each additional time you need to utilize the class. |
Welcome Guest, Not a member yet? Register Sign In |