Session Handling

The functions in this section work with the session handling capabilities of PHP. They were added in PHP 4. To read more about their use, turn back to Chapter 7. That chapter also includes a complete example.

boolean session_decode(string code)

Use session_decode to read encoded session data and set the values of global variables in the session. This happens automatically when you start a session with session_start.

boolean session_destroy()

The session_destroy function eliminates all the data stored in the session. It does not destroy the session itself, however.

string session_encode()

The session_encode function returns a string that contains encoded information about the current session.

string session_id(string id)

Use ...

Get Core PHP Programming: Using PHP to Build Dynamic Web Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.