I have a MySQL table called "sessions", that contains a session_id, user_id, ip_address, and last_updated field.
I have the following questions:
What's the best way of updating the "sessions" table if the user has not visited the site before, or if the user navigates to a different page?
If a users navigates to a page that requires them to be logged in, what's the best way of remembering the page that they were viewing, prior to them being redirected to the login page, so that they can be returned to it after logging in?
How do I calculate the total number of members/guests currently online, and the total members/guests for the day, even if users of the same computer use different web browsers?
I want to display how many users/guests are viewing a certain page. What's the best way of keeping track on what page the user is currently on.
Any help is greatly appreciated. I've been scratching my head about the above for some time!!! ;)