The answer is kind of long though not complicated. Ermm.. yeah it gets kind of complicated when you are talking about somewhat complex session management that goes on a forum like this phpbb board.
In its most simple case data can be passed from one page to another via form. Those submits buttons you click passes variables from one page to another.
Php can issue a global variable and carry the variable from one page to another. But global variables have some security issues, so it is not used very often.
Php can use a cookie to store data in the user's computer and than retrieve and use it as necessary.
Php can use something called a session variable. You can assign a session id for as many variables as you wish. Then call the session and use the variable anytime you wish. Very neat! Here is a simple example of session handling:
Set php session variables:
| Code: |
session_start();
$_SESSION['variableName1'] = "value1";
$_SESSION['variableName2'] = "value2";
session_write_close(); |
Retrieve php session variables
| Code: |
session_start();
$gimmeVar1 = $_SESSION['variableName1'];
$gimmeVar2 = $_SESSION['variableName2'];
session_write_close(); |
Very easy. Save the php session id and the related variables in a database if you wish. By default the php zend engine itself handles the session.
Well that's about the summary. If you are interested about any particular method we can discuss even more details.
_________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.