Default value is GET.
Method attribute of Form tag controls type of request, usually GET or POST.
e.g
<form action="url" >
<input id="searchkeyword" type="text" name="searchkeyword" />
<input type="submit">ClickMe</input>
</form>
ClickMe button triggers GET request. Text entered into searchkeyword textbox will be sent in QueryString as
searchkeyword=[text]
Explicit method setup.
Post request
<form action="url" method="POST">
Get request
<form action="url" method="GET">
Method attribute of Form tag controls type of request, usually GET or POST.
e.g
<form action="url" >
<input id="searchkeyword" type="text" name="searchkeyword" />
<input type="submit">ClickMe</input>
</form>
ClickMe button triggers GET request. Text entered into searchkeyword textbox will be sent in QueryString as
searchkeyword=[text]
Explicit method setup.
Post request
<form action="url" method="POST">
Get request
<form action="url" method="GET">
No comments:
Post a Comment