There are two important method in PHP that is POST and GET method..Can anyone tell me what they are? and How they have been implemented? This method have everywhere been used in PHP and hence wanted to know more about it..
There are two important method in PHP that is POST and GET method..Can anyone tell me what they are? and How they have been implemented? This method have everywhere been used in PHP and hence wanted to know more about it..
POST and GET method are basically same, both the method used to pass the value using URL only the difference is that Post value provides more security while sending parameters with the URL, In the GET method when we forward the URL, form field value send along with URL, therefore there is possibility that the password value may visible in the URL. but that same problem has been eliminated in POST method.
There are two ways the browser client can send information to the web server. POST is most secure so it have to pass some process. GET is simple way to send via URL so it is will be fast. Before the browser sends the information, it encodes it using a scheme called URL encoding. The GET method sends the encoded user information appended to the page request. Whereas if you send the form with POST method then user can not see that information and Secondly When you want to send short or small data & Less Sensitive Data then you can use GET Method.
For your more understanding i will put an example here:
Code:<html> <head> <title>GET and POST Example</title> </head> <body> <H1>Processing forms</H1> GET your name: <?php echo $_GET['name']," ",$_GET['last'] ?><br> POST your name: <?php echo $_POST['name']," ",$_POST['last'] ?> <br> </body> </html>
Bookmarks