Saturday, May 9, 2009

GET and POST

<form action="form_action.asp" method="get" target="_self">

The difference between GET and POST

GET is passed as part of the URL and as such is far more easily altered by the user and cached by proxy servers.

POST is slightly more secure, and isn't limited to only the 255 byte limit that GET data is restricted to.

The HTTP method for sending data to the action URL.

Default is get.

method="get": This method sends the form contents in the URL: URL?name=value&name=value. Note: If the form values contains non-ASCII characters or exceeds 100 characters you MUST use method="post".

method="post": This method sends the form contents in the body of the request. Note: Most browsers are unable to bookmark post requests.


Action

A URL that defines where to send the data when the submit button is pushed


target

Where to open the target URL.

_blank - the target URL will open in a new window

_self - the target URL will open in the same frame as it was clicked

_parent - the target URL will open in the parent frameset

_top - the target URL will open in the full body of the window

No comments: