form methods

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
nincha
Forum Contributor
Posts: 191
Joined: Fri Mar 28, 2003 12:30 pm
Location: CA, USA

form methods

Post by nincha »

the post method is common and can bee seen often, but what i rarely find is the get method. Can some one give me an example when this method is used
User avatar
Kriek
Forum Contributor
Posts: 238
Joined: Wed May 29, 2002 3:46 am
Location: Florida
Contact:

Post by Kriek »

GET method takes information from the form and puts it in the URL being called by the action such as file.php?var=value which is classified as a query string. POST method does not put the information in the address bar but rather uses headers instead. On the same token in PHP you grab these accordingly with $_GET Variables provided to the script via HTTP GET. Analogous to the old $HTTP_GET_VARS array (which is still available, but deprecated) and $_POST Variables provided to the script via HTTP POST. Analogous to the old $HTTP_POST_VARS array (which is still available, but deprecated).
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

In this forum for example. :)
The & (and) symbol makes it possible to make more than one GET method as you can see. It's also handy in searches so the user always knows what query he/she just ran, Google and most others use it. In a few dozen other places also. Just never use it with secure datalike usernames/passwords.
Post Reply