As you have seen different form components to handle various types of Inputs, now we will learn how to upload files from the client computer to the server by using file type input text box. In our normal input box the type attribute is set to TEXT but here our input type is set to FILE.
This input box is a special type of box where one browse button will appear and using that user can open a file explorer to point to a file of local machine. After selection of the file the path of the file will appear in the file input box. The form type is set to ENCTYPE="multipart/form-data" . Note that we are not going to discuss here how to handle the file upload, this is explained in our php file upload section.
Here is the sample form to display a file upload text box with browse button.