Home  >  Article  >  Backend Development  >  Method of passing value between PHP and PHP script

Method of passing value between PHP and PHP script

WBOY
WBOYOriginal
2016-08-08 09:25:531153browse

Using SESSION is very convenient.

For example, if you want to pass the id value in A.php to B.php, the method is:

In A.php:

session_start();
$_SESSION['get_id'] = $get_id;

Receive in B.php:

session_start();
$get_id = $_SESSION['get_id'];//从session读取id
This is OK

The above introduces the value transfer method between PHP and PHP scripts, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

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