Session Management

Sessions can be used to store data at server side between the multiple requests from the same client.

Exmple #1


In this example counter2 variable value is stored in session variable. It gets incremented on each request.

Controller

  1. span style="color:#996600;">"at"

Viewv


views\look\at.rhtml

  1. span style="color:#996600;">"at""submit"

Output

Working with sessions
Counter 1 = 1
Counter 2 = 6