storing data across successive requests

What is the best way to store pieces of information from one request to the next? Obviously, you could set and get channel variables, but that could be expensive with having to do multiple requests per set/get operation.

You could just store those bits of information in a session for easy access later. Each request will include a session_id POST or GET parameter. With this session_id parameter value you should be able to initialize a session using its value as the session identifier. This level of control is available in just about every web programming language. An example of doing this in PHP would look similar to the following:

if ( array_key_exists( 'session_id', $_REQUEST ) ) { 
    session_id( $_REQUEST['session_id'] ); 
} 
session_start(); 

After you've started the session, you will have access to a session variable or object that can be used to store information that you can access on subsequent requests.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.54.7