Difference Between the GET, POST and REQUEST methods ?

In PHP the methods GET and  POST  are used to send the form data .

GET Method :
1024 Bytes of data can be transferred via this method and the transfer data parameters are visible in the address bar so it is not as much as secure method .

Declaration : 

$get = $_GET[‘variable’];

POST method :
It does the same as the GET but the main difference between the GET and POST is that the transferred data are not visible to end user thus , it is much secure in comparison GET method.

Declaration : 

$post = $_POST[‘variable’];

REQUEST Method : 
This method accept the form parameters either the method is GET or POST.

Declaration : 

$request = $_REQUEST[‘variable’]; 

Leave a Reply

Your email address will not be published.Required fields are marked *