sessions are easy enough to understand:
you want to store a bit of information on the server so that a user can remember certain variables between page requests....
ok so you make a file.. and store the variables in it...
you now need to give the user something to identify her by...
ok so you give them a cookie with their session id
viola you have based cookies...
now php does not do this by default... does not look for a cookied session id try to find the file and try to load the file up for the user to access...
you have to tell it to do this with the function session_start() which you need to call first so all the session information is available for the rest of the script
if you call session_destroy() at the end of each page... it will erase the session file and tell the browser to destroy the cookie... so no information will get the to next page...
now this works fine on one server... but becomes a problem with multiple servers.... i know it can be done... you have to let each server share a common pool of sessions and give out common style session cookies... i don't know off the top of my head how to do that ... but i do think its a server question and not a php question... i know Zope does it i know WebSphere does it... and websphere is just apache... so im assuming apache does but with some sort of extension module...
does anyone else have a clue about this?
what your friend suggested in writting your own session functions...
you can tell php when its time to load a session , store a session, or delete a session, you can have php call your homegrown functions instead of using its own...
if your functions connect to a database, and do the work, then it doesn't matter where the servers are or how many there are... they will all share a common table of a common database when doing session stuff...
read up in the php manual about how sesssion to find out more about doing this