Before you can use the the $_POST variable you have to have a form in html that has the method equal to POST. Then in the php, you can use the $_POST variable to get the data that you wanted. The $_POST syntax is ($_POST['name of the form field goes here']). Examples The $_POST syntax
GET vs POST . Should we use the GET method for sending data from an HTML form, or the POST method instead? GET and POST access methods are defined in the HTTP protocol and included in the HTML specification. The choice of method depends on how the data is received, the size and nature of the data. The GET method adds data to the URL Both GET and POST method is used to transfer data from client to server in HTTP protocol but Main difference between POST and GET method is that GET carries request parameter appended in URL string while POST carries request parameter in message body which makes it more secure way of transferring data from client to server in http protocol. The
表单提交中get和post方式的区别 - Halo3224 - 博 …
Apr 22, 2012 · This video is part of an online course, Web Development. Check out the course here: https://www.udacity.com/course/cs253. Post/Redirect/Get (PRG) is a web development design pattern that lets the page shown after a form submission be reloaded, shared, or bookmarked without ill effects, such as submitting the form another time.
To send submitted data through form, one can use GET & POST method to do that in PHP. A form data can be submitted using these two methods. Both are used for same purpose but stands apart under some specifications. As in GET method key values are passed in the Url while in POST, the information transfers in a hidden manner.
2020-6-21 · As @Gumbo says URLs are logged and appear in more places thus GET requests are a little more insecure than POST requests. The point is that a lot of people think that POST requests are much more secure than GET reqs because they can see the data directly in the URL but using, for example, a proxy software that intercepts browser requests anyone can view and alter POST data.