note 55614 deleted from features.file-upload.multiple by peehaa

From: Date: Mon, 04 Nov 2013 09:15:02 +0000
Subject: note 55614 deleted from features.file-upload.multiple by peehaa
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197430@lists.php.net to get a copy of this message
Note Submitter: Bob Doe ---- Here is a the simple test form I needed, pieced togther from 2 or 3 posts in the documentation elsewhere. <html> <head> <title>HTML Form for uploading image to server</title> </head> <body> <form action="" method="post" enctype="multipart/form-data"> <p>Pictures: <input type="file" name="pictures[]" /> <input type="file" name="pictures[]" /> <input type="file" name="pictures[]" /> <input type="submit" value="Send" /> </p> </form> <?php //places files into same dir as form resides foreach ($_FILES["pictures"]["error"] as $key => $error) { if ($error == UPLOAD_ERR_OK) { echo"$error_codes[$error]"; move_uploaded_file( $_FILES["pictures"]["tmp_name"][$key], $_FILES["pictures"]["name"][$key] ) or die("Problems with upload"); } } ?> </body> </html>

« previous php.notes (#197430) next »