There seem to be two below, but the first one somehow gave me a timeout error, so I decided to go with the second one.
Use include and require functions
Use $_SESSION and $GLOBAL
Note, however, that the following error will occur if you put any output (var_dump, blank space, new line, etc.) before session_start(), which is a declaration that uses $_SESSION!
Include, require may be included.
Warning: session_start() [function.session-start ]: Cannot send session cache limiter - headers already sent (output started at
Furthermore, it seems that $_SESSION should only be used in one place. Otherwise, the following error will occur.
Notice: A session had already been started - ignoring session_start() in