0

I am having a problem in counting the user that visit to a website of mind using php.
I want to count those user by day, week, month, in total and store them in MYSQL database.
I have been searching through lots of site and still cannot figure it out yet.

Please someone help me with this.

3
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by tomato.pgn
0

If you have login in your site this is very simple, just create database table containing users who login and you can count it using sql count function when querying.
If you don't have try to use Google analytics, its free and you can track your visitors, views and statistics.

0

For all type of user(registered and unregistered) you can use session_id() and it works like this if the session_id() is set then increment a counter otherwise no action.....
Check this link to understand more about session_id()....Click here..
Also if u just want to do for registered users then add a field in database and assign a particular value ..if user logins change that field value and for every change make track of records.....
Hope this is clear....
PS-If your problem is solved mark this thread as solved so that it would be easy to navigate through other's thread and be notified that your problem is solved....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.