Jump to content


Photo

array


  • Please log in to reply
3 replies to this topic

#1 bob_the _builder

bob_the _builder
  • Members
  • PipPipPip
  • Advanced Member
  • 207 posts

Posted 02 May 2006 - 10:46 PM

Hi,

Using

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

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


Thanks

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 02 May 2006 - 10:52 PM

No PHP is required at this stage...
<input type="file" name="photo_filename[]" size="30">


#3 phporcaffeine

phporcaffeine
  • Members
  • PipPipPip
  • Advanced Member
  • 361 posts
  • LocationOhio, USA

Posted 02 May 2006 - 10:54 PM

[!--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) View Post[/div][div class=\'quotemain\'][!--quotec--]
Hi,

Using

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

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">
Thanks,

Ryan Huff
President & Founder, MyCodeTree
support@mycodetree.com | http://mycodetree.com

#4 bob_the _builder

bob_the _builder
  • Members
  • PipPipPip
  • Advanced Member
  • 207 posts

Posted 02 May 2006 - 11:06 PM

Hi,

*edit*

My bad, it wasnt writing to the database therefore not generating an id stoping the proper functionality.


Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users