Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms/QueryStrings/GET/POST 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Can someone help clarify the POSTvsGET method.

If I have a form with INPUT tags and submit it with method="post" that is sending POST variable, yes?

If I have a form with INPUT tags and submit it with method="get" that is getting the data to populate the from via GET, yes ?

---------------------------------------------------
What is a URL Query String? is it a GET method or a POST method?

And why would a URL QUERY string work over a submitted form using the POST method.

Thanks, 1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
A GET method uses the Querystring to send information, a POST sends it as an a attachment in the HTTP headers.

The advantage of a GET over a POST is that a GET doesn't require a form, you can create the Querystring manually if you want, have it sitting as a link on your page, whatever. The disadvantage of GET over POST is that GET has a size limit. Well, more correctly, GET has size limits. See, there is no size limit specified in the standards, so differant browsers have differant limits for querystring...which can make things interesting.

-T

signature.png
 
Thanks for the reply,

so if a form has method="GET" it puts the data on the URL as a QueryString.

What I thought, and needed to know as I had the API documentation and it said I needed to POST the data but that doesn't work, yet if I use a QUERY string (which I thought was a GET method) it works, so therefore their documentation is wrong as it required a GET method to work not POST.

Cheers,
1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top