Carry session data from one page to another
Created by: Dr.Ferrous
how to carry session data from one page to another and to other pages as well??
Session variables are not stored in HTML or php files to be passed, they are data stored on the server and are available on any page as long as the session is alive.
Assume you have a page named "index.php" with the following script:
And you want to pass the session variable "SiteName" to another page, simple write the following:
This will return "phpwin.org".
For more information about sessions, please read this lesson Sessions