QUOTE
<form action=submit.php method=post>
or:
QUOTE
<form action=submit.php method=get>
One thing is that if you don't specify a method, then the Web server assumes that you are using the GET method. So what's the deal? They do the same thing right? Well, almost. You may have noticed that the URL looks a lot longer after you submit a form that uses the get method. For example, you may see something like:
QUOTE
http://trap17.com/gamer.php?name=god&a...laying+god+mode
Don't click the link above. Its just example.
Don't click the link above. Its just example.
That was just a comment but what if you had to submit password? The problem is the submitted url will be stored in history creating all sorts of security problems. The get method puts the contents of the form right in the URL. There are a few disadvantages to this. First, depending on your Web server's operating system and software, there is a limit to how much data you can send through a form using the get method. On many systems, this limit is 256 characters. Another thing is that, the individual GET queries are nicely stored in your Web server logs. If you are using space on a shared server, then other people on that server may be able to access data sent from your forms that use the get method.
The post method was created to correct the inadequacies of the get method. The information sent using the post method is not visible in the URL, and form data cannot be extracted by looking in the Web server logs. There also isn't such a small limit on the amount of data that can be sent from a form. Again, it depends on your server, but you probably won't ever hit the limit of sending data using the post method for a text-based form.
I use the post method for my scripts unless I need to debug something (I work a lot with php). When you need to debug something on a form, it is easy enough to switch to the get method (by changing the action line in your script) and then check the URL after you submit your buggy form. You can usually pick up typos and such with a quick look.
That is all what you should know about these when creating forms. If you have any doubts then ask here and others post your opinions.


