February 2006
Intermediate to advanced
826 pages
63h 42m
English
The file-selection form field (type="file") lets users select a file stored on their computer and send it to the server when they submit the form. It is displayed as a text entry field with an accompanying “Browse” button for selecting the file, as shown in the following markup and in Figure 15-10. As for other text fields, you can set the size and maxwidth values as well as the field’s default text. When using the file input type, you should specify enctype="multipart/form-data" in the form element.
<formenctype="multipart/form-data"> <p>Send this file with my form information:</p> <inputtype="file"size="28" /> </form>

Figure 15-10. The file-selection form field