[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Single Page

Top Document: FAQ: Frequently Asked Questions about CGI Programming
Previous Document: 1.17 What is CGIWrap, and how does it affect my program?
Next Document: SECTION 2 - HTTP HEADERS AND NPH SCRIPTS


1.18 How do I decode the data in my Form?



The normal format for data in HTTP requests is URLencoded.   All Form data
is encoded in a string, of the form
	param1=value1&param2=value2&...paramn=valuen
Many non-alphanumeric characters are "escaped" in the encoding:
the character whose hexadecimal number is "XY" will be represented by
the character string "%XY".

Decoding this string is a fundamental function of every CGI library.

Another format is "multipart/form-data", also known as "file upload".
You will get this from the HTML markup
<form method="POST" enctype="multipart/form-data">

(but note you must accept URLencoded input in any case, since not all
browsers support multipart forms).

Most(?) CGI libraries will handle this transparently.




Top Document: FAQ: Frequently Asked Questions about CGI Programming
Previous Document: 1.17 What is CGIWrap, and how does it affect my program?
Next Document: SECTION 2 - HTTP HEADERS AND NPH SCRIPTS

Single Page


[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
Nick Kew <nick@webthing.com>

Last Update December 05 2008 @ 00:13 AM

© 2008 FAQS.ORG. All rights reserved.