I have a mysql database set up for my website so members can register and log in to view members only pages.

I want to be able to see how many times people login and the amount of time they are logged in.
How can I set it up so that everytime the table info is requested(user logs in) it increments a value in a different column.

I really don't know how to even start with keeping track of the time logged in so any suggestions would be appreciated.

Confused and a little frustrated