If you want to upload the picture or any file to the form, then the form will be suitable for upload. Then it was done if the value of the input element was entered in the value attribute.

An upload form

<form action="create.php" method="post" enctype="multipart/formdata">
<input type="file" name="user_file" />
</form>

If you want to upload a file, you must give this enctype = “multipart / formdata” attribute on form. And input type = “file” is to be given.

Disabled, readonly attributes that can be used are discussed in the earlier tutorials.

hidden field

====================

The input field can be hidden. As a result, you can not show any field in the form of the browser but in the form, you can enter any data value attribute with the hidden field. Such as

<input type="hidden" name="currency" value="dollar"/>

Suppose your site has a price list, the user selects one of the packages and submits them to send a form to the form page. With the help of JavaScript or PHP, you can create a hidden field in the original form that the package selects. There are times when the requirement of the hidden field is seen.