Jump to content

Difference?


Recommended Posts

GET passes the form information through the URL where POST does not.GET is typically used when a form is related to a search tool. Notice after you do a searhc on google, that you have along URL with all the information you submitted contained in there. Having the information in the URL allows a user to bookmark the page. So when they return they don't have to post the same information in a form.POST is typically used for a form that only intends to send information one way - to the server. So your log-in forms or forms that collect demogrpahic information are going to be using the POST method.Rule of Thumb - when in doubt, use post - or - If you're not searching for something, use post.

Link to post
Share on other sites
Those are the only two?

From a form, yes. A form can only do action="get" or action="post". But, php, like asp and cold fusion, can place variables in different scopes. For instance, you could have anyone of these as well:_GET_POST_COOKIE_SESSIONetc.re: http://us3.php.net/variables.scope
Link to post
Share on other sites

Don't forget $_SERVER too, it holds information about some of your server settings such as the requested URI, the current URI or the name of your domain. (this comes in handy if you use the same script on different locations, and want to target a certain location variable to each current)You can read more about it at www.php.net :)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...