View Full Version : Differences between GET and POST methods ?

12-09-2014, 10:34 AM
Differences between GET and POST methods ?

12-10-2014, 12:57 AM
passed as arrays. Get is added to an address line ie. mypage.php?getvalue=myvalue.
this is now an array $_GET['getvalue'] and is passsed as myvalue.
it is therefor less secure as an address can be modified in a browser address bar.
Post values are pased typically from a form as $_POST array

12-21-2014, 10:00 PM
GET uses the URL to put form variables in.
POST doesn't, probably via data stream you can't see. for this reason, most forms for security reasons choose post. however, if you want a page bookmarkable, you use GET. but nothing says you can't use both. :grin:
I do this with some of my forms.
I forget whether you set the form tag for GET or POST, probably POST so that it works, but nothing says you can't feed arguments via URL to your POST PHP. so you can use $_GET[]. and I do. one example might be an image viewer PHP from a database or counter, where you COULD feed the page path via URL as a database table column and your count as the other column. so you have page counters for all your pages.

for my calculators, in which the values I want to be bookmarkable, I use GET. the calculators have no server-side processing except for the submit to the server via GET in order to make a URL - I believe the browser does this encoding (I use js to parse the URL arguments, since there is no built-in function to do so).

Merry Christmas!
Jesus is the reason for the season! the birth of God's Son 2000 years ago!