How the form post method really works behind the scenes

I used both get / post me and information about the differences both in terms of limitations / security, and all.

Well, when we use the get method, we get the data from the query string, and that's fine.

Now, for the message:

Say, from one.php, we pass the name of the variable, which is in the form with the method = "post", and we get it in two.php with $ _POST ['name'], where this name is actually stored between these 2 pages and where do they really come from and can you access it with $ _POST?

Also, are there any chances for anyone to crack / see the data in any way?

Thank!!

+4
source share
1 answer

The value is stored in the query.

HTTP requests are made up of several key components. Mainly:

  • The address
  • Headings
  • Body

The key difference between GET and POST in this case is that GET has no body. Therefore, any data that you want to include in the GET must be included in the address. However, POST has a body. And it includes key / value pairs for the values ​​in this body.

Take a look at the browser debugging tools and examine the requests / responses when interacting with the server. For a POST request, you will see that you can really check the values. (What can you consider when talking about knowing the "security" of these queries ...)

"" . , GET-. .

+3

All Articles