Sessions

Sessions change the World Wide Web from random page reads to a coordinated, focused interaction between the user and the Web site.

Compare visiting a naturopath to learning about natural health from the back of packets in supermarkets. The bottle of vitamin C on the supermarket shelf features a little sales pitch on how vitamin C cures everything form dandruff to cancer. The jar of zinc tablets at the suermarket features the information that zinc helps you with everything from cancer to dandruff. The information is isolated and uncoordinated.

Now visit the naturopath for a session. The naturopath will take you through a coordinated discussion and point out things like the health benefits of vitamin C, but will warn you that chewing concentrated vitamin C can lead to the ascorbic acid eating holes in your teath. The naturopath will tell you that zinc is good for your skin and it can help with dandruff, but your diet contains enough zinc, and the zinc is leached away by all that coffee. Each time you visit the naturopath, he or she will write down the things you say, and before the next visit, will read what happened at the previous sessions.

Web site sessions help in a similar way. You can use a session to learn what the user wants and deliver exactly what is wanted. You are not limited to selections from the current page or data entered in to one form.

The chapter on Sessions contains the following sections:
   In Depth
      Benefits to the Owner
      Benefits to the Visitor
      Session Identifier
      Cookies
         HTTPS
         Cookies versus URLs
      Files versus Database
      PHP Facilities
         php.ini
         PHP Session Functions
      Customer Service
   Immediate Solutions
      Starting a Session Using Cookies and Files
      Starting a Session Using MySQL
      Displaying Current Users
      Using session_end()
         Files
         Databases