Welcome Guest, Not a member yet? Register   Sign In
[asking] Making Multidimensional array upload
#1

[eluser]fsw[/eluser]
I have a form like this:
Code:
<tbody>
    <tr>
        <td scope="col" class="title"><div class="data">Event Notification</div></td>
        <td rowspan="2" scope="col" class="title file">
        <div class="data">
            &lt;?php if (isset($error)) echo $error;?&gt;
            &lt;input type="file" name="userfile[]" size="20" class="multi" /&gt;
            <br />
        </div>
        </td>
    </tr>
    <tr>
        <td scope="col" class="title">
        <div class="data">
        Note
        <br/>
        <br/>
        <fieldset>
            <legend title="">
            &lt;textarea id="nature_of_loss" name="nature_of_loss" cols="25" rows="7" class="round-corner-4px"&gt;&lt;?php echo set_value('nature_of_loss'); ?&gt;&lt;/textarea&gt;&lt;/textarea>
            </legend>
        </legend>
    &lt;?php echo form_error('nature_of_loss'); ?&gt;
        </div>
        </td>
    </tr>
    <tr>
        <td scope="col" class="title"><div class="data">Fact Finding Survey</div></td>
        <td rowspan="2" scope="col" class="title file">
        <div class="data">
            &lt;?php if (isset($error)) echo $error;?&gt;
            &lt;input type="file" name="userfile[]" size="20" class="multi" /&gt;
            <br />
        </div>
        </td>
    </tr>
    <tr>
        <td scope="col" class="title">
        <div class="data">
        Note
        <br/>
        <br/>
        <fieldset>
            <legend title="">
            &lt;textarea id="nature_of_loss" name="nature_of_loss" cols="25" rows="7" class="round-corner-4px"&gt;&lt;?php echo set_value('nature_of_loss'); ?&gt;&lt;/textarea&gt;&lt;/textarea>
            </legend>
        </legend>
        &lt;?php echo form_error('nature_of_loss'); ?&gt;
        </div>
        </td>
    </tr>
</tbody>

I'm using http://www.mitesdesign.com/blog/open-sou...de-igniter for each of the file upload, so each one of them have multiple upload capabilities and there are 7 of them.

The question is how to make it upload multidimensonaly... thx before
#2

[eluser]Ben Edmunds[/eluser]
Why not use the multi file upload library in that article?
#3

[eluser]fsw[/eluser]
I can use the multi upload from that library, but what i want is every upload that happen have it's own unique id, so it's like:


id 1 -> have multiupload
id 2 -> have multiupload
id 3 -> have multiupload
id 4 -> have multiupload
and so on....


If i'm not mistaking, that's a multidemensional array right? and the library doesnt accept multidemensonal array, well i'll look for another way around, until someone has a good idea how to make this work, or maybe it's just me being stupid LOL. Thx for the fast reply though.
#4

[eluser]Ben Edmunds[/eluser]
You can just loop through the array and upload each file.

Maybe I don't understand the problem but you should simply be able to do a foreach on each upload and do one upload per file.
#5

[eluser]fsw[/eluser]
I use uploadify instead with tab to seperate it, fiuh.... it's done now.




Theme © iAndrew 2016 - Forum software by © MyBB