GET POST and REQUEST in PHP?

Difference between GET, POST and REQUEST in PHP?
Answer:
GET: Syntaxt is $_GET["somevariable"];
$_GET variable is used to collect values in a form with the method="get".
Information sent via a form which has the method as get is visible to everyone as it is displayed as parameters in the browsers address bar.

POST: $_POST["somevariable"];
$_POST variable is used to collect values in a form with the method="post".
Information sent from a form with the POST method is not visible to others as it does not get displayed in the browsers address bar.
There is no limit as to how many parameters can be sent in POST.

REQUEST: $_REQUEST["somevariable"];
This can be used to collect data from both POST and GET Methods.

0 comments:

Post a Comment