Jump to content

File Uploads


00Sven

Recommended Posts

Hi, I have been looking around this site for a while since I started PHP and finally decided to join.  Now on to the question...
I have set up a file uploader for my site.  This works perfectly except that I can only select one file at a time.  Is there a way that I can allow the user to select more than one file at a time?
Link to comment
https://forums.phpfreaks.com/topic/16158-file-uploads/
Share on other sites

Several ways of doing this
<form method='post' action='' enctype='multipart/form-data'>
<input type='file' name='ufile[]' /><br />
<input type='file' name='ufile[]' />
Making the results into an array

or
<input type='file' name='ufile1' /><br />
<input type='file' name='ufile2' /><br />

and then loop through them

REMEMBER
when having file uploads in forms you need to name the enctype in the form tag
Link to comment
https://forums.phpfreaks.com/topic/16158-file-uploads/#findComment-66754
Share on other sites

Archived

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

×
×
  • Create New...

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.