Syntax: Boolean session_register (string name);
Registers a new variable.
Return Value: Boolean value
Function type: Data processing
Content Description
This function adds a variable to the current Session in the global variable. The parameter name is the variable name that you want to add. Success returns a true value.
If in the header file, open session, that is, using the session_start () function followed by Session_register (string name) (such as Session_register (' username ')), Then this variable becomes a global variable that will affect all files that use call Session_Start ().
Such as:
Session_Start ();
$username = ' Test ';
Session_register (' username ');
echo $_session[' username ']; Output test
?>
The above describes the PHP session_register function in detail, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.