ptg16476052
Creating Form Controls with the <input> Tag 339
12
The File Upload Control
The file control enables a user to upload a file when he submits the form. As you can see
in the following code, the type for the input element is set to file:
Input ▼
Figure 12.16 shows a file upload control.
Output ▼
If you want to use a file upload field on your form, you have to do a lot of behind-the-
scenes work to get everything working. For one thing, the program specified in the
action attribute of your form must be able to accept the file being uploaded. Second, you
have to use the post method for the form. Third, you must set the enctype attribute of
the