Get ready for BLACK FRIDAY shopping starting in

Forums

PHP

This topic is locked

Count each member use

Posted 25 Jul 2002 05:08:27
1
has voted
25 Jul 2002 05:08:27 Man CHAN posted:
Anyone can point me in a right direction that I want to count how many times that each member use my website.

All member is alredy registed. So they must login first before enter my site.

My idea is to create one more field say "number" in member table. This record is starting from 0 and then after each login, this number plus 1.

Is that possible?

Replies

Replied 25 Jul 2002 15:29:45
25 Jul 2002 15:29:45 Michael O'Neill replied:
I have not tried this but you should be able to do it if you add a small piece of hand code to the login behaviour. If I succeed I will post the script here.

Regards
Mike.

Edited by - carphone on 25 Jul 2002 15:30:09
Replied 12 Aug 2002 15:59:17
12 Aug 2002 15:59:17 Michael Guntenaar replied:
easy stuff <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

When you login simply also query the user_id of this person (I think your allready doing this)

Then after this person is loogged in do an update query

mysql_query("UPDATE the_table SET thefield = thefield+1 WHERE id = the_queried_id";

Works like a charm <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 19 Aug 2002 16:25:30
19 Aug 2002 16:25:30 fws fws replied:
How would you do this to say count the number of times a file is downloaded ?

Shan

Reply to this topic