Multiple File Upload |
[eluser]Thiago Leao[/eluser]
I'm trying to send 5 images, but only sends 1. Anyone know where I'm wrong? Thanks Code: <?php Code: function go() {
[eluser]darrentaytay[/eluser]
I done a simple blog post on this for 2 images - should be easily adapted for 5: http://darrenonthe.net/2011/05/08/upload...deigniter/
[eluser]phpxpert[/eluser]
After uploading one image you are redirecting the user to another page by the code Code: redirect(base_url().'administracao/cad_produto/upload/'.$data['id_products'], 'refresh'); so place the redirecting command after the for loop
[eluser]Thiago Leao[/eluser]
hi friends, actually, I forgot to get the redirect loop! thank you all!
[eluser]Thiago Leao[/eluser]
Hi guys, I'm having another problem!! I'm trying to send 3 images. but it attempts to send 5, and userfile_4 undefined. I'm finding that my count is wrong!! A PHP Error was encountered Severity: Notice Message: Undefined index: userfile_4 Filename: administracao/upload.php Line Number: 17 Code: for ($i = 1; $i < count($_FILES['userfile_'.$i]); $i++) {
[eluser]Thiago Leao[/eluser]
I did it! for ($i = 0; $i < count($_FILES); $i++) |
Welcome Guest, Not a member yet? Register Sign In |