name : mary jones
email : mjones@jones.com
If the request method is "get" then it wd be formatted as
GET /cgi/register.cgi?name=mary+jones&email=mjones%40jones.com HTTP/1.1
Host: localhost
If the request method is POST, the request message wd look like
POST /cgi/register.cgi HTTP/1.1
Host: localhost
Content-length: 67
Content-type: application/x-www-form-urlencoded
name=mary+jones&email=mjones%40jones.com #this is content body
In case of GET, the string attached to request is received by QUERY_STRING, how is that received in case of POST ?
Content-Length is received by CONTENT_LENGTH parameter on the server. Where does the content body go ? does it move to the server with the request ? Does it get stored in stdin on the server and from there it is read in a scalar variable ?
I am kind of confused with this. I did some reading, but still confused. Pls explain this.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.