| | |
upload multiple files
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2008
Posts: 14
Reputation:
Solved Threads: 0
hi everyone i am uploading multiple files with different names,so sometimes i want to upload a single
file within that form how do i handle that with php script.Can someone help me with php script that will allow you to upload name or picture ,or sometimes upload both at the same time using these form.
file within that form how do i handle that with php script.Can someone help me with php script that will allow you to upload name or picture ,or sometimes upload both at the same time using these form.
php Syntax (Toggle Plain Text)
<form action="file-upload.php" method="post" enctype="multipart/form-data"> Send these files:<br /> <input name="name[]" type="file" /><br /> <input name="pictures[]" type="file" /><br /> <input type="submit" value="Send files" /> </form> php script <?php $target = $_POST['path']; $fileone = $_FILES['name']['name']; $filetwo = $_FILES['picture']['name']; $Tdate = date('dFY'); $path= "/home/myfiles/".$Tdate."/".basename($_FILES['upload']['name']) ; if(move_uploaded_file($_FILES['uploaded']['tmp_name'],$destfile)) { echo "copied succesfully to ".$destfile."<br/>"; } else { echo "failed to copy<br/>"; } ?>
Last edited by peter_budo; Aug 26th, 2008 at 4:33 pm. Reason: Keep It Organized - please use [code] tags
![]() |
Similar Threads
- Multiple File(s) upload without Multiple Browse option (ASP.NET)
- Selecting Multiple Files And/Or Folder (JavaScript / DHTML / AJAX)
- How to uppload Multi ple files in asp.net or c#..? (ASP.NET)
- uploading multiple files, 'post' not working off server (works fine off local host) (JSP)
- Multiple Selection Attachments. (ASP.NET)
- Server Busy & Multiple Pop-ups (Viruses, Spyware and other Nasties)
- Sluggish G4, Multiple Symptoms (OS X)
Other Threads in the PHP Forum
- Previous Thread: Executing upload on secondary page
- Next Thread: PHP mail function issue
| Thread Tools | Search this Thread |
ajax apache api array beginner binary body broken cakephp checkbox class cms code cron curl database date date/time display dynamic echo email error file files folder form forms function functions gc_maxlifetime global google host href htaccess html image include insert integration ip java javascript joomla limit link list login loop mail memmory menu mlm msqli_multi_query multiple mycodeisbad mysql navigation oop parameter parsing paypal pdf php problem query radio random recourse recursion regex registrationform remote script search seo server sessions sms soap source space sql static syntax system table tutorial update upload url validator variable video web webdesign wordpress xml youtube






