Keeping the value of a variable from one page to another

Hi Everybody,

I do not understand how PHP will keep data collected on one PHP script so that data will be available to any other scripts.
For an example: I can create variables in a “LogIn.php” script. Lets call one of several possibilities $Access.

  • At any other point in the web-site, say a “comment.html” page, I may want to know the value of $Access

  • How can I maintain the value of $Access throughout the whole web-site?

Many Thanks,
Paul
(If I wasn’t so stupid, I wouldn’t have to be so persistent.)

Its called setting a Session.

https://www.php.net/manual/en/session.examples.basic.php

Sponsor our Newsletter | Privacy Policy | Terms of Service