I'm very new to PHP/mySQL so please forgive me if this is a silly 
question. I'm mostly trying to understand the concepts involved in 
tracking user activity with sessions, and despite hours of reading I'm 
still confused.

I have a membership site with users authenticated by a mySQL database. I 
have incorporated sessions into the login script which passes the 
session variables to a page restricted to members-only that contains 
links to articles. 

Here's the question: If a member logs out (session_destroy()) or closes 
the browser, the session data is gone, right? How, then, would I go 
about storing information about the member's activity on the site? The 
next time they log in, I'd like to greet them with a message that says 
"Hi, $username. You last visited the site on $date and you viewed the 
following articles: $article1, $article2."

Do I need to store the sessionid in the database and register more 
variables to track the activity, or should I write a separate script 
that stores details of their activity, perhaps as a separate table in 
the database? What I really don't understand is whether this sort of 
tracking is done with sessions or by writing to a database. (OK that's 
more than one question.)

Also, if I do need to store the session ID in the database and I don't 
have access to the php.ini file, is there a way to set the 
session_save_handler to user through .htaccess or some other means?

Thanks very much for any help you can provide.

Vicki

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to