Tutorial for Enctype Attribute in html for php

What is  Enctype Attribute?

This Attribute indicates that data in the form should be encoded before being submitted to the server. This sort of property can only be utilised if the method is set to “POST.”

Syntax:

<form enctype = "value">

Element:– The enctype property is only applicable to the form> element.

Attribute Value: There are three values for this characteristic, which are given below:

  • application/x-www-form-urlencoded:– It’s the default setting. Before sending the data to the server, it encodes all of the characters. Spaces are converted to + symbols, while special characters are converted to their hex value.
  • multipart/form-data:– There is no character encoded in this value.
  • text/plain:– This value converts spaces to + symbols, however it does not convert special characters.

Example:

Output:-

Supported Browsers: The browser supported by enctype Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Apple Safari

Tagged : / / / / / / /