Jump to content

Archived

This topic is now archived and is closed to further replies.

bob_the _builder

array

Recommended Posts

Hi,

Using

[code]  <input type="file" name="<?php echo 'photo_filename[]'; ?>" size="30"> [/code]

it only sends the first photo to the process page, how should it be to create the array?


Thanks

Share this post


Link to post
Share on other sites
No PHP is required at this stage...[code]<input type="file" name="photo_filename[]" size="30"> [/code]

Share this post


Link to post
Share on other sites
[!--quoteo(post=370720:date=May 2 2006, 06:46 PM:name=bob_the _builder)--][div class=\'quotetop\']QUOTE(bob_the _builder @ May 2 2006, 06:46 PM) [snapback]370720[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi,

Using

[code]  <input type="file" name="<?php echo 'photo_filename[]'; ?>" size="30"> [/code]

it only sends the first photo to the process page, how should it be to create the array?
Thanks
[/quote]


Not quite sure what you mean here -

If your trying to do a multiple file thing here then your almost right, you don't need the whole <?php bit either becuase all your doing is echoing literal text there, unless you meant ' $photo_filename[] '.

<input type="file" name="photo_filename[]" size="30"><br />
<input type="file" name="photo_filename[]" size="30"><br />
<input type="file" name="photo_filename[]" size="30"><br />

<input type="submit" name="sub" value="Upload">

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.