Post and Get
There are two methods that you can use when creating a form in HTML. They are post and get, as in:
<form action=submit.php method=post>
or:
<form action=submit.php method=get>
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:
http://web.com/form.php?name=fred&age=20&comments=This+site+rocks
That's because 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 ...
Get Advanced PHP for Web Professionals now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.