If you want something you've never had, you must be willing to do something you've never done!

Powered by Blogger.

Php Programming Tutorial "Post Vs Get" 1

Cerita Semalam Aaz | 10:50 PM | ,



We have used the GET method of the <form> tag:
<form method="GET"></form>
We saw it appends a query string to the URL when the form is submited.
http://localhost/preferences.php?font-color=red&background-color=yellow
There is another method of sending the information, the POST method:
<form method="POST"></form>
The POST method sends the information in the HTTP message header. The URL of the called page will not include the query string and the information transfer will be transparent to the user. This technical difference is not the only difference and is not the most important.
The most important difference is semantic. When you use GET you are implying that nothing will be changed when you submit the form, while when POST is used something will be permanently commited.
So if you will be doing a database query GET is preferred and when confirming a pizza order POST is the way to go. There is nothing preventing you from doing the opposite, but we will see that it will not work as well.

1 Responses So Far:

alga said...

good....
can you help me?

Related Post

 
Back To Top