O'Reilly logo

Core PHP Programming: Using PHP to Build Dynamic Web Sites by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required