HTML » input » type="file"

The type="file" control is used to attach a file to a form. When the form is submitted, the file is passed along with all the other contents of the form.

This control displays an input window and a browse button. By clicking on the browse button, the user can search your directories for the desired file. When you find it, a double mouse click will select the file. Alternately, you can enter the path and name of the file into the input window. A value for the name attribute is required. You do not use the value attribute.

To use the type="file", you must set both the enctype and method attributes of the form tag exactly as shown in the this code snippet.