This video shows you how to use PHP to upload a file to your PHP web server.
I start with the HTML form, that prompts the user to browse for a file to upload. Things to watch for:
Use the enctype="multipart/form-data" attribute in your form declaration. If you forget that, nothing will work.
The form action must be the name of the php file that processes the form: action="upload_file.php"
The method should be POST: method="post"
Note that the $_FILES["file"] variable is an array with such goodies as:
error, name, type, size, and tmp_file to access;
On this page of the site you can watch the video online PHP - How to Upload a File to Your PHP Web Server - HTML Form and PHP Script Tutorial.avi with a duration of hours minute second in good quality, which was uploaded by the user Help Video Guru 27 April 2011, share the link with friends and acquaintances, this video has already been watched 118,210 times on youtube and it was liked by 311 viewers. Enjoy your viewing!