PDA

Click to See Complete Forum and Search --> : User login count


nmretd
Oct 5th, 2000, 04:17 AM
I have set up a user login system. Is there a way I can count the number of times a particular user logs in ?

monte96
Oct 5th, 2000, 09:26 AM
You'll need a database...

then it's very easy.. just update the count field of the table when they login.

Dim
Oct 5th, 2000, 12:52 PM
I think the easiest way would be to use the registry to store/REtreive the number from the registry.

Dim x As Integer
'REtreive on form load
Private Sub Form_Load()
x = GetSetting("MyProgram", "save", "x", 0)
End Sub

'Store when loged in
Private Sub cmdLogin_Click()
x = x + 1
SaveSetting "MyProgram", "save", "x", x
End Sub


Gl,
D!m

Wen Lie
Oct 6th, 2000, 11:04 AM
Well...

I agree with Monte96...
To make you easier, just try to make a table for User Login nd Password, and of course, add a field for Counter...

Cheers,
Wen Lie

monte96
Oct 6th, 2000, 03:25 PM
This is not the type of info that should be written to the registry of the web server. It belongs in a database.

[Edited by monte96 on 10-08-2000 at 01:00 AM]

Elanor Memphis
Oct 7th, 2000, 04:30 PM
Originally posted by monte96
This is not the type of info that should be written to the registry of the web server. It belongs in a daabase.

I don't think so either. By using the register a normal person can't manipulate the value.
When you put it in an acces database, you can change the value in wathever you want.

Sorry for my poor english!

monte96
Oct 8th, 2000, 12:03 AM
Well, that's not exactly why..

Data stored in the registry should only be things such as settings for an application. A web app should never need to write to the registry for the most part. The point of putting it in a database is that it can then be displayed on a web page and easily tracked.

Dim
Oct 8th, 2000, 04:13 PM
Chill guys...I thought he was talking about the logining into his application and not some online based server. If that's the case then a db is a good idea.

D!m

monte96
Oct 8th, 2000, 07:50 PM
sorry d!m.. didn't mean to get so militant about it :c)