Saturday, June 12, 2010

ENCTYPE

In most cases you will not need to use this attribute at all. The default value (i.e. if you don't use this attribute at all) is "application/x-www-form-urlencoded", which is sufficient for almost any kind of form data. The one exception is if you want to do file uploads. In that case you should use "multipart/form-data". See file uploads for more details.

ENCTYPE determines how the form data is encoded. Whenever data is transmitted from one place to another, there needs to be an agreed upon means of representing that data. Music is translated into written music notation, English is written using letters and punctuation. Similarly, there needs to be an agreed on way of presenting the form data so it's clear that, for example, there is a field called "email" and its value is "raha@idocs.com".

Attribute for FORM ...
ENCTYPE = "multipart/form-data" | "application/x-www-form-urlencoded" | "text/plain"

No comments:

Post a Comment