how to upload a file via web browser?

Could someone please describe (in detail please!) how I can create a page where people can upload files to a directory in my website?

Thank you!  (support for php and stuff, but I have no idea how to use them)
Who is Participating?
Juan OcasioApplication DeveloperCommented:
Here is a simple way:


     <FORM ACTION="upload.php" METHOD=POST ENCTYPE="multipart/form-data">
      Submit this File: <INPUT TYPE=FILE NAME="theFile"><BR>

      if(copy($theFile, "locationToSaveFile"))
           echo("File upload successful");
           echo("File upload unsuccessful");

      unlink($theFil); //destroys file  


hope this helps a bit

Jaime OlivaresSoftware ArchitectCommented:
Since is a common question, have a look to this previous answer:
If you have any doubt, please advice.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.