p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Session and placing their ID numbers in mySQL


Message #1 by "John Arbon" <subscriptions@c...> on Thu, 25 Apr 2002 02:29:36
On page 221 of Professional PHP4 there are 5 functions listed in the 
middle of the page.

Are these user defined functions, or functions that are predefined by PHP?

And I am quite confused about the whole session handling script that the 
author builds in the subsequent pages.  Can anyone help me understand just 
what they are trying to do, and how it works?

Thanks!

John
Message #2 by "Nikolai Devereaux" <yomama@u...> on Wed, 24 Apr 2002 22:11:16 -0700
Don't have the book... but if the functions are something like
"session_open", "session_close", "session_garbage_collection",
"session_write", "session_read", and "session_destroy", then those are
user-defined functions.

PHP gives you the power to define how you want your sessions handled with
user-defined sessions.  Most people use these "custom" session handlers to
throw session data into a database.  Other people like to manage their own
files.  Some like to do both.

Some completely ignore session specific tasks and watch the new Strong Bad
email on www.homestarrunner.com/.  These people rock, because Homestar is
hilarious.  However, that doesn't help us here.

There's a few good tutorials that explain the gist of session handling
functions.  Check out www.phpbuilder.com and look through their list of
articles for custom session handling in php4.  The article(s) are a bit old,
but they provide a great place to start.


Nik

Message #3 by "John Arbon" <subscriptions@c...> on Thu, 25 Apr 2002 23:28:19
Nik,

Thanks!  I'll check out that site, also! 8)

John

> 
Don't have the book... but if the functions are something like
"session_open", "session_close", "session_garbage_collection",
"session_write", "session_read", and "session_destroy", then those are
user-defined functions.

PHP gives you the power to define how you want your sessions handled with
user-defined sessions.  Most people use these "custom" session handlers to
throw session data into a database.  Other people like to manage their own
files.  Some like to do both.

Some completely ignore session specific tasks and watch the new Strong Bad
email on www.homestarrunner.com/.  These people rock, because Homestar is
hilarious.  However, that doesn't help us here.

There's a few good tutorials that explain the gist of session handling
functions.  Check out www.phpbuilder.com and look through their list of
articles for custom session handling in php4.  The article(s) are a bit 
old,
but they provide a great place to start.


Nik


  Return to Index