Re: Send files before the php script executes

From: Date: Thu, 07 Oct 2004 18:27:37 +0000
Subject: Re: Send files before the php script executes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-198870@lists.php.net to get a copy of this message
On 7 Oct 2004 09:17:26 -0700, Ruben Duarte <ruben.alutiz@knet.es> wrote: > Anybody knows if is posible in Linux with PHP to do upload of several > files sending the data before that php script executes. Now in my > server you do the upload (with html,form, multipart ...) and first all > the files are upload and them the php script is executed. > > The idea is the next: In the server in my php script I want to > proccess each file separated because if the conexion is lost the user > don't have to send all the files again , only have to send the files > that haven't been uploaded and proccessed. You just have to make the file field names arrays: <form enctype="multipart/form-data" action="_URL_" method="post"> <input type="file" name="uploaded_files[]"> <input type="file" name="uploaded_files[]"> <input type="file" name="uploaded_files[]"> <input type="submit" name="submit" value="Submit"> </form> Then all the regular image processing code you find here: http://www.php.net/manual/en/features.file-upload.php will still apply, just to the array of files, instead of to a single file. You will find print_r($_POST) very helpful when you can't figure something out with form submissions. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/

« previous php.general (#198870) next »