Need help for: 2 image uploads with one form [SOLVED] |
[eluser]Christoph Rumpel[/eluser]
Hi, ive been struggling with this problem the whole night and i just dont understand it. I have a simple form with one picture upload and resize function. That is working perfectly. But now i want a form with 2 file inputs and one submit button, so a user can upload 2 files. I just cant get it to work! This is my code: VIEW: Code: <?php CONTROLLER: Code: <?php There are several sites in the Internet telling, it is simple to do what i want like: see example In his example he is uploading the date with the field name: Code: $this->upload->do_upload("my_field_name_2"); But in my code this is not working. In my code i am never using the name of the input field and it works. Strange istn it?? I hope there is someone out there, who can help me. Not jsut me! There are a lot of people out there who are struggling with this issue an i hop we can fix it together! thx
[eluser]InsiteFX[/eluser]
That Example is old code! Code: $filenew = rename("./avatars/" . $file_data['file_name'], "./avatars/newfile".$file_data['file_ext']); InsiteFX
[eluser]Christoph Rumpel[/eluser]
Thx for help. Ok now i know how to get the selected file, but where do i tell the uploadfunction, which file to upload and which upload settings are for which file? And what is the rename for?
[eluser]darrentaytay[/eluser]
I've made a simple demo with multiple uploads on my blog (it isn't finished but this post should help ya): http://darrenonthe.net/2011/05/08/upload...deigniter/
[eluser]Christoph Rumpel[/eluser]
Hi Darren, that's exactly what i wanted to know. Thank you so much!! Cant test it now, but i will implement it tomorrow. Thx a lot!=) greets from Austria
|
Welcome Guest, Not a member yet? Register Sign In |