|12-09-2014, 11:57 PM||#2|
Join Date: Aug 2005
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, 09:00 PM||#3|
Join Date: Dec 2010
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.
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).
Jesus is the reason for the season! the birth of God's Son 2000 years ago!
improperly<strong>nested<em>elements</strong>cause</em> browser confusion (I believe the term is 'tag soup')!
Last edited by jmichae3; 12-21-2014 at 09:05 PM..