[Previous] [Contents] [Next]


Handler Implementations

The best way to arrange the functions that implement the session handlers is to place them in a single support file. By placing the functions shown in Example D-2 through Example D-9 in the one file, you can include that file at the beginning of any PHP script using sessions. The support file containing the handler implementations-for example mysql_sessions.inc-must be included before any session calls are made as shown in the following example:

<?php
  include("mysql_sessions.inc");
  start_session(  );

  //... rest of script ...

?>

[Previous] [Contents] [Next]