The PHP superglobals $_GET and $_POST are used to collect form-data.
<html> <body> <form action="form.php" method="post"> Name: <input type="text" name="name"><br> E-mail: <input type="text" name="email"><br> <input type="submit"> </form> </body> </html>
The POST method can be used to send ASCII as well as binary data. The data sent by POST method goes through HTTP header so security depends on HTTP protocol. By using Secure HTTP you can make sure that your information is secure. PHP $_POST associative array is used to access all the sent information by POST method.
Note:We can also use $_GET in form as a method
GET can’t be used to send binary data, like images or word documents, to the server. The data sent by GET method can be accessed using QUERY_STRING environment variable. The PHP provides $_GET associative array to access all the sent information using GET method.
In $_GET method when we will submit the form than some values will be displayed in URL