I'm going to discuss about an attribute of the html tag <form>. The very common attribute that would appear only when you want to upload an image, enctype, is requests the browser to use the encoding technique while submitting the form.

The default value for this attribute is "application/x-www-form-urlencoded". Normally browser would consider this attribute when the form method is "post". The value "multipart/form-data" should be used in combination with the INPUT element, type="file".

If you want to provide an option on your webpage to upload an image, you should use the form method "post" and enctype as "multipart/form-data". In this case only, browser will transfer the complete file content to the server. This would take some time to upload the data to the server depends on the file size that user chooses to upload.

Hope you guys understand the concept. Probably I can place a sample for this later.

Click here to check out programs that I've developed.