Jump to content

Recommended Posts

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 "abc@xyz.com".

 

What is Actually Sent with ENCTYPE

The browser encodes form data very differently for application/x-www-form-urlencoded and "multipart/form-data".

 

POST /cgi-bin/maillist.cgi HTTP/1.0

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

Referer: http://www.idocs.com/tags/foo.html

Accept-Language: en

Content-type: multipart/form-data; boundary=---------------------------7cd1d6371ec

UA-pixels: 640x480

UA-color: color8

UA-OS: Windows 95

UA-CPU: x86

User-Agent: Mozilla/2.0 (compatible; MSIE 3.0; Windows 95)

Host: 10.10.10.20

Content-Length: 25852

Pragma: No-Cache

Connection: Keep-Alive

 

-----------------------------7cd1d6371ec

Content-Disposition: form-data; name="realname"

 

Steve Johnson

-----------------------------7cd1d6371ec

Content-Disposition: form-data; name="email"

 

steevo@idocs.com

-----------------------------7cd1d6371ec

Content-Disposition: form-data; name="MyPicture"; filename="C:\My Documents\Java\misc\pics\steve.jpg"

Content-Type: image/jpeg

 

 

http://www.htmlcodetutorial.com/forms/form_enctype.html

Link to comment
https://forums.phpfreaks.com/topic/73754-upload-form-enctype/#findComment-372132
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.