Jump to content

Difference?


Armed Rebel

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 comment
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 comment
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 comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...