logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12-09-2014, 10:34 AM   #1
Eastmanldh
Eastmanldh's Avatar
 
Join Date: Dec 2014
Posts: 3
Default Differences between GET and POST methods ?

Differences between GET and POST methods ?
Eastmanldh is offline   Reply With Quote
Old 12-10-2014, 12:57 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,176
Default

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
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is online now   Reply With Quote
Old 12-21-2014, 10:00 PM   #3
jmichae3
 
Join Date: Dec 2010
Posts: 366
Default

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).


Merry Christmas!
Jesus is the reason for the season! the birth of God's Son 2000 years ago!
__________________
------------
Jim Michaels
HTML Code:
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 10:05 PM..
jmichae3 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:43 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com