GET and POST in PHP

In this tutorial we will learn about Get and POST in PHP. Web browser communicate with web server by using two http methods GET and POST. These methods are use to send information to web server. Here we will learn about these methods and we will learn what is difference between these two methods.

GET and POST in PHP


GET method:

When we use GET method it send data to web server as URL parameters. It send data to web server in key value pair. When you work with GET method you can easily see all GET parameters in URL bar like this http://www.example.com/search.php?product=books. Here we will learn how we can send data from HTML form to server using GET method.

Example

Hello, " . $_GET["name"] . "

"; } ?>


POST method:

When we send data using POST method to web server. Data would not visible in URL bar. In POST method data send to web server separately as a package with processing script. Check this example to understand it.

Example

Hello, " . $_POST["name"] . "

"; } ?>




Share this tutorial with your friends on your social Media..

GET and POST in PHP GET and POST in PHP GET and POST in PHP GET and POST in PHP



Now You Can Follow All These Tutorials on Your Android Mobile Just Download This App.


Owlbuddy.com