I have used both get / post me and aware about the differences of both with regards to limitations / security and all.
Well,when we are using get method,we are getting data from query string and that is fine.
Now,for the post :
Let's say from one.php, we are passing variable name which is in form with method = "post" and we are getting it in two.php with $_POST['name'], where this name actually stored in between these 2 pages and from where it actually comes and one can able to get access it with $_POST?
Also, is there any chances for data being hacked / visible by / to anyone anyhow ?
Thanks!!
POST is an HTTP method designed to send data to the server from an HTTP client. The HTTP POST method requests the web server accept the data enclosed in the body of the POST message. HTTP POST method is often used when submitting login or contact forms or uploading files and images to the server.
The POST method transfers information via HTTP headers. The information is encoded as described in case of GET method and put into a header called QUERY_STRING. The POST method does not have any restriction on data size to be sent. The POST method can be used to send ASCII as well as binary data.
When a normal form submits, the page is reloaded with the response from the endpoint that the form submitted to. Everything about the current page that does not exist in a persistent medium (such as cookies, or Storage) is destroyed, and replaced with the new page.
The Correct Answer is " Request. Form". The Request. Form command is used to collect values in a form with method="post".
The value is stored in the request.
HTTP requests consist of a few key components. Mainly:
The key difference between a GET and a POST in this case is that a GET has no Body. So any data you want to include in a GET needs to be included on the Address. A POST, however, does have a Body. And it includes the key/value pairs for the values in that Body.
Take a look at your browser's debugging tools and examine the requests/responses when interacting with the server. For a POST request, you'll see that you can in fact inspect the values. (Which you may want to consider when you talk about knowing the "security" of these requests...)
The values aren't "stored" anywhere special. They work almost exactly like they do in a GET request. They're simply in another part of the request format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With