Home  >  Article  >  Backend Development  >  The difference between session and post in php

The difference between session and post in php

王林
王林Original
2019-09-12 17:45:424018browse

The difference between session and post in php

session

In php, the session variable is used to store information about the user session (session), or change User session settings. Session variables store information for a single user and are available to all pages in the application.

Start session: session_start();

Store session variables: $_SESSION;

Destroy session: unset() or session_destroy();

##post##post is a request method, In addition, there is also a get request method. In PHP, the predefined $_POST variable is used to collect values ​​from the form with method="post".

The information sent from the form with the POST method is invisible to anyone (will not be displayed in the browser's address bar), and there is no limit on the amount of information sent.

Note: By default, the maximum amount of information sent by the POST method is 8 MB (can be changed by setting post_max_size in the php.ini file).

The above content is for reference only!

Recommended video tutorial:

PHP video tutorial

The above is the detailed content of The difference between session and post in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn